HLSL shaders
Moderators: jesterKing, stiv
-
- Posts: 0
- Joined: Wed Jul 21, 2004 4:48 pm
- Location: Sweden
HLSL shaders
Are there any plans for implementation of HLSL shaders in Blender?
-
- Posts: 6
- Joined: Wed Oct 16, 2002 3:14 am
-
- Site Admin
- Posts: 207
- Joined: Fri Oct 18, 2002 12:48 pm
- Location: Finland
In tuhopuu gameengine you can find support for GLSL shaders.
(http://projects.blender.org/viewcvs/vie ... ot=tuhopuu)
/jesterKing
(http://projects.blender.org/viewcvs/vie ... ot=tuhopuu)
/jesterKing
-
- Posts: 0
- Joined: Wed Jul 21, 2004 4:48 pm
- Location: Sweden
Shaders may be implemented i openGL also using
OpenGL® Shading Language
Here is a quote from http://www.theregister.co.uk/2003/07/01 ... ces_opengl
http://www.opengl.org/documentation/oglsl.html
http://www.theregister.co.uk/2003/07/01 ... ces_opengl
OpenGL® Shading Language
Here is a quote from http://www.theregister.co.uk/2003/07/01 ... ces_opengl
More ...The HLSL was approved by the OpenGL Architecture Review Board, the standard's governing body, on 11 June and is likely to form the basis for OpenGL 2.0, the next major revision of the open graphics API.
http://www.opengl.org/documentation/oglsl.html
http://www.theregister.co.uk/2003/07/01 ... ces_opengl
You can use GLSL in tuhopuu2.
Check out the PyDoc stuff for how to load your shader, and how to set uniforms, etc.
Check out the PyDoc stuff for how to load your shader, and how to set uniforms, etc.
-
- Posts: 0
- Joined: Wed Jul 21, 2004 4:48 pm
- Location: Sweden
Excellent work Kester... this could be very promising indeed !!!You can use GLSL in tuhopuu2.

Quick question though...
Won't this kill / hinder the performance of the game engine to some degree ???
For example, the game engine isn't known for its speed ( no offence intended ), so wouldn't GLSL bring it down even more ???
On a side note...
Great news about the 'Shadow' support in the game engine, all of your work in this field is greatly appreciated !!!

Take care,
Panther
Last edited by Panther on Thu Jul 22, 2004 8:08 pm, edited 1 time in total.
It really depends on the graphics card. I test with a Radeon 9800XT and a GeForce FXGo5200. The Radeon loves it, it barely misses a step. The FX5200 does get killed.Won't this kill / hinder the performance of the game engine to some degree ???

Also, vertex buffer objects and display lists are in Tuhopuu2.
Also also, gcc generates faster code than MSVC (~33%)
Put these together, and I'm getting around 60fps with 100k onscreen quads. This is of course static geometry, deformed objects such as armatures and zsorted objects and the rest of the game will slow you down.
There is a BIG difference between those two cards, especially in price. I hope you didn't mean it as a direct comparison of nvidia vs ati.alien-xmp wrote: It really depends on the graphics card. I test with a Radeon 9800XT and a GeForce FXGo5200. The Radeon loves it, it barely misses a step. The FX5200 does get killed.The FX5200 just doesn't have the fill rate, the speed is proportional to the size of the object being shaded.
Which driver versions were you using for each as well?
Do you have proof of this? I've read nothing but article after article stating the opposite.alien-xmp wrote: Also also, gcc generates faster code than MSVC (~33%)
ATI giving better OpenGL performance than NVIDIA... I never thought I'd see the day !!!It really depends on the graphics card. I test with a Radeon 9800XT and a GeForce FXGo5200. The Radeon loves it, it barely misses a step. The FX5200 does get killed.

I'm using a standard ( not 'Go' ) 128MB GeForceFX 5200, what do you think my chances are of getting 60FPS performing a similar test to you - Good / bad ???
Interesting... is that documented somewhere / do all the developers know that ???gcc generates faster code than MSVC (~33%)

I know we're speaking about Tuhopuu here, but does anyone know which compiler is used to generate all the 'Official' BF releases ???
Yeah I know. One of the nvidia papers showed a similar performance jump between the 5200 and their high end models. The FX cards also have a nicer shader engine (longer shaders, dFdx works.) The FX is also running at 1600x1200, while the ATI is at 1024x768, which is 240% more pixels to shade.IoN_PuLse wrote:There is a BIG difference between those two cards, especially in price. I hope you didn't mean it as a direct comparison of nvidia vs ati.alien-xmp wrote: It really depends on the graphics card. I test with a Radeon 9800XT and a GeForce FXGo5200. The Radeon loves it, it barely misses a step. The FX5200 does get killed.The FX5200 just doesn't have the fill rate, the speed is proportional to the size of the object being shaded.
Which driver versions were you using for each as well?
I mostly test driver 61.06 on Linux, and occaisionally use 61.76 on Windows. The ATI is on Catalyst 4.6. (Not the latest, but it will take me all day to download the next revision.)
I know, I was quite surprised when I saw it, and I only compiled with gcc because I was helping someone on IRC. I'm basing it on game framerates:IoN_PuLse wrote:Do you have proof of this? I've read nothing but article after article stating the opposite.alien-xmp wrote: Also also, gcc generates faster code than MSVC (~33%)
Ballercoaster: MSVC: ~120fps, gcc: ~160fps
55Wheels: MSVC: ~30fps, gcc: ~40fps
MSVC extra compiler flags: /Og /Oip /GR
GCC extra compiler flags: -O2 -ffast-math
Since the game engine is mostly C++, could it be that this speed increase is limited to C++ code for whatever reason? Because for the rest of blender, I've heard quite the opposite.alien-xmp wrote:I know, I was quite surprised when I saw it, and I only compiled with gcc because I was helping someone on IRC. I'm basing it on game framerates:IoN_PuLse wrote:Do you have proof of this? I've read nothing but article after article stating the opposite.alien-xmp wrote: Also also, gcc generates faster code than MSVC (~33%)
Ballercoaster: MSVC: ~120fps, gcc: ~160fps
55Wheels: MSVC: ~30fps, gcc: ~40fps
MSVC extra compiler flags: /Og /Oip /GR
GCC extra compiler flags: -O2 -ffast-math
Martin
Life is what happens to you when you're busy making other plans.
- John Lennon
- John Lennon