Tebjan Halm wrote:
to be honest, i dont read the whole mail ... *ashamed*
tststs
so if i want to use shaders, i have to compile gem together with the shader code ? there is no object, that can load shaders ?
there are objects that load shaders (from files) you just have to compile Gem from CVS to get these objects.
... and which shader language is supported ind gem ?
currently just ARB-shaders (and in theory NVSL) so no Cg and no GLSL; i am currently thinking about how GLSL would be best integrated (which pd-object set would be nice); once i have figured that out, it should be done pretty quick.
mfg.asd.r IOhannes
greets
On Oct 18, 2005, at 7:27 AM, IOhannes m zmoelnig wrote:
Tebjan Halm wrote:
... and which shader language is supported ind gem ?
currently just ARB-shaders (and in theory NVSL) so no Cg and no GLSL; i am currently thinking about how GLSL would
be best integrated (which pd-object set would be nice); once i have
figured that out, it should be done pretty quick.
...as ya might've guessed, I'm already into a coupla drafts of a glsl-
based [shader_program]...the first try was simply to mimic what I did
for the ARB programs, but then I found that glsl is different in that
you compile programs to objects, then link those objects into a
shader, which then can be used when needed...another twist is that
while one does need to specifiy whether the program is vertex or
fragment when creating a shader object, you can actually just link
together vertex and fragment shader objects for the final shader:
discovered this looking at some of the latest nvidia sample code
(specifically gpu_videoeffects)...
...so, I think this means we should just have one [shader_program]
that can accept one or two names as arguments (vertex shader followed
by fragment?), but we would then need some mechanism to determine
which one is the vertex or fragment shader...so, I've been just going
ahead with making it a message based object, such that you send a
[vertex nameOfVertexShader< and/or [fragment nameOfFragShader< to the
[shader_program]...then the shader_program will try to link together
whatever it has, report what happens, and go on from there...
...how's this sound?
jamie
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
Tebjan Halm wrote:
... and which shader language is supported ind gem ?
currently just ARB-shaders (and in theory NVSL)
I tried the example for vertex_program now (after I compiled Gem-CVS) and there seems to be an error in the toon.vp file. Gm prints:
vertex_program: program error at line 24: "DP3 t0.x, state.matrix.modelview[0].invtrans.row[0], vNormal;"
With trial and error I managed to "fix" this by removing the first [0] now:
DP3 t0.x, state.matrix.modelview.invtrans.row[0], vNormal; ...
Is this correct? At least it looks cartoony now.
Frank Barknecht _ ______footils.org_ __goto10.org__
hi frank,
On Oct 20, 2005, at 11:29 AM, Frank Barknecht wrote:
I tried the example for vertex_program now (after I compiled Gem-CVS) and there seems to be an error in the toon.vp file. Gm prints:
vertex_program: program error at line 24: "DP3 t0.x, state.matrix.modelview[0].invtrans.row[0], vNormal;"
With trial and error I managed to "fix" this by removing the first [0] now:
DP3 t0.x, state.matrix.modelview.invtrans.row[0], vNormal; ...
Is this correct? At least it looks cartoony now.
...weird...the shader in cvs is correct (ie. before your change):
are you loading the texture (64shade.tif or 2shade.bmp)? Also, there
is the lightDirection parameter that can be changed (defaults to
0,0,0, which doesn't give much good shading), but I'll have to check
out the given example (are you using the examples/02.advanced/
programs?)...
...lastly, what card are you running this on (and drivers)?
jamie
Hallo, james tittle hat gesagt: // james tittle wrote:
On Oct 20, 2005, at 11:29 AM, Frank Barknecht wrote:
I tried the example for vertex_program now (after I compiled Gem-CVS) and there seems to be an error in the toon.vp file. Gm prints:
vertex_program: program error at line 24: "DP3 t0.x, state.matrix.modelview[0].invtrans.row[0], vNormal;"
With trial and error I managed to "fix" this by removing the first [0] now:
DP3 t0.x, state.matrix.modelview.invtrans.row[0], vNormal; ...
Is this correct? At least it looks cartoony now.
...weird...the shader in cvs is correct (ie. before your change):
are you loading the texture (64shade.tif or 2shade.bmp)? Also, there
is the lightDirection parameter that can be changed (defaults to
0,0,0, which doesn't give much good shading), but I'll have to check
out the given example (are you using the examples/02.advanced/
programs?)...
I'm using examples/02.advanced/16.vertex_program.pd with defaults for the shading bitmap texture, that is 64shade.tif.
...lastly, what card are you running this on (and drivers)?
It's on my latop (MSI S260) with a Intel GMA900 chipset (that's the newer Intel onboard chipset). So it's no ATI or NVidia chip, if that matters.
The drivers are the default drivers for xorg, all this is on Linux (Ubuntu Hoary). (Actually I was a bit surprised that it works at all on a non-NVidia card. Should this work on "all" OpenGL cards, maybe even my old Matrox G450?)
Frank Barknecht _ ______footils.org_ __goto10.org__
It's on my latop (MSI S260) with a Intel GMA900 chipset (that's the newer Intel onboard chipset). So it's no ATI or NVidia chip, if that matters.
The drivers are the default drivers for xorg, all this is on Linux (Ubuntu Hoary). (Actually I was a bit surprised that it works at all on a non-NVidia card. Should this work on "all" OpenGL cards, maybe even my old Matrox G450?)
i think the shader-implementation you are using is implemented in mesa, so it should work on any card. (the example uses ARB-shaders not nvidia-specific ones) however, it might be slow...
i'll go and try to find a machine with mesaGL instead of nvidia's drivers to check...
mfg,asd.r IOhannes
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
It's on my latop (MSI S260) with a Intel GMA900 chipset (that's the newer Intel onboard chipset). So it's no ATI or NVidia chip, if that matters.
In fact according to X.org.log it's a: "Chipset 915GM"
or: http://www.intel.com/products/chipsets/915gm/index.htm
Frank Barknecht _ ______footils.org_ __goto10.org__