GI Baby Steps
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
GI Baby Steps
I just made my first steps on the GI field.
And that's not military talk.
I implemented basic static environment sampling with the filtering in the pixel shader (eventually, that will be "somewhat" (1) moved to a precomputation stage at every environment update - so not even once per frame).
No ambient occlusion of any kind... yet.
Mosty because I couldnt nor didn't have time to get a baking, bust also because there are some details (about baking) that I haven't resolved yet (like, for instance, I think I'll need more than one coordinate set to transport the info, which I'd like to avoid).
(1) - Some will still remain on the pixel shader to allow dynamic ambient occlusion.
Ok... why talk...
Indirect diffuse (Ambient)
Indirect diffuse + Direct diffuse
Indirect diffuse + Direct diffuse + Indirect specular + Direct specular
And that's not military talk.
I implemented basic static environment sampling with the filtering in the pixel shader (eventually, that will be "somewhat" (1) moved to a precomputation stage at every environment update - so not even once per frame).
No ambient occlusion of any kind... yet.
Mosty because I couldnt nor didn't have time to get a baking, bust also because there are some details (about baking) that I haven't resolved yet (like, for instance, I think I'll need more than one coordinate set to transport the info, which I'd like to avoid).
(1) - Some will still remain on the pixel shader to allow dynamic ambient occlusion.
Ok... why talk...
Indirect diffuse (Ambient)
Indirect diffuse + Direct diffuse
Indirect diffuse + Direct diffuse + Indirect specular + Direct specular
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Looks good, so by "ambient specular" you mean like environment mapping?
How did you filter in the shader?; I thought it couldn't be done. Manual multi-sampling and averaging?
You intend to compute specular dynamic occlusion with environment mapping somehow?
My original idea for static specular occlusion was to square the radiosity baking (darken it) and premultiply the the spec map with it. Gross, I know, but it would have been a way of "playing safe", kind of.
Just upload it if you need a baking; I can do one in 5 minutes; I got that figured out I think. Not sure what you mean by more than one coord set, tho.
If you have a bumpmap for the bricks, I could try and compute a radiosity baking of it in Gimp and combine it with Blender's baking. I guess I'll need to compute 2nd derivative (concavity), or something faking it...
(Actually, best thing would be to use height field to generate subdivision geometry, heard there's a script for that, then do the baking...)
How did you filter in the shader?; I thought it couldn't be done. Manual multi-sampling and averaging?
You intend to compute specular dynamic occlusion with environment mapping somehow?
My original idea for static specular occlusion was to square the radiosity baking (darken it) and premultiply the the spec map with it. Gross, I know, but it would have been a way of "playing safe", kind of.
Just upload it if you need a baking; I can do one in 5 minutes; I got that figured out I think. Not sure what you mean by more than one coord set, tho.
If you have a bumpmap for the bricks, I could try and compute a radiosity baking of it in Gimp and combine it with Blender's baking. I guess I'll need to compute 2nd derivative (concavity), or something faking it...
(Actually, best thing would be to use height field to generate subdivision geometry, heard there's a script for that, then do the baking...)
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Wel... yes... but I find "direct/indirect specular" a much more accurate term, because it so happens that everything in those pictures is some form of environment mapping.chuck_starchaser wrote:Looks good, so by "ambient specular" you mean like environment mapping?
Yep.chuck_starchaser wrote:How did you filter in the shader?; I thought it couldn't be done. Manual multi-sampling and averaging?
In fact, I just saw the difference between the 6600 and the 9800: In the 6600, I could do this (in the pixel shader):
Code: Select all
const float ds=1.0/8.0;
const float d_mypos=8.0;
const int nsc=8;
for (int s=-nsc; s<=nsc; ++s)
for (int t=-nsc; t<=nsc; ++t)
dlighting += exrpand_rgbs(textureCube(EnvironmentMap,
bump+ds(s*tgw+t*tgw)), d_mypos);
dlighting *= 0.5/float((2*nsc+1)*(2*nsc+1));
Yep.chuck_starchaser wrote:You intend to compute specular dynamic occlusion with environment mapping somehow?
Well... if you'd take the time to do it, I'd rather have you use something more interesting than a stone teapot (though a stone teapot sounds interesting).chuck_starchaser wrote:Just upload it if you need a baking; I can do one in 5 minutes; I got that figured out I think. Not sure what you mean by more than one coord set, tho.
Have anything, with bumps and all?
Ya... subdivision geo + bake is really nice, but if you're doing the baking to a texture. If you do it to vertex attributes (color), like we talked, subdivision won't help.chuck_starchaser wrote:If you have a bumpmap for the bricks, I could try and compute a radiosity baking of it in Gimp and combine it with Blender's baking. I guess I'll need to compute 2nd derivative (concavity), or something faking it...
(Actually, best thing would be to use height field to generate subdivision geometry, heard there's a script for that, then do the baking...)
We could have both techniques implemented - no sweat.
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Won't pretend I understand anything there, except perhaps that there's a nested loop scanning in x and y; just thought I'd mention though chances are 99.999% you already know, it will run fast if the number of iterations, unrolled, fit within the length of the pipeline.klauss wrote: In fact, I just saw the difference between the 6600 and the 9800: In the 6600, I could do this (in the pixel shader):(and it would run - not too fast, but run nonetheless).Code: Select all
const float ds=1.0/8.0; const float d_mypos=8.0; const int nsc=8; for (int s=-nsc; s<=nsc; ++s) for (int t=-nsc; t<=nsc; ++t) dlighting += exrpand_rgbs(textureCube(EnvironmentMap, bump+ds(s*tgw+t*tgw)), d_mypos); dlighting *= 0.5/float((2*nsc+1)*(2*nsc+1));
Wow!Yep.chuck_starchaser wrote:You intend to compute specular dynamic occlusion with environment mapping somehow?
That's just it; I have nothing yet. Wonder if there might be something, somewhere on the net... Let me do some googling.Have anything, with bumps and all?
Right, I forgot; unless we keep the subdivisions...Ya... subdivision geo + bake is really nice, but if you're doing the baking to a texture. If you do it to vertex attributes (color), like we talked, subdivision won't help.
Well, I'll just do a standard baking, for now; --better than no baking--; and a highly subdivided one if you want, later; just need to find out how to convert the bump-map to geometry...We could have both techniques implemented - no sweat.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Well... all it does is average an area of the environment map. It's not the final version - because of it slowness, I had to unroll manually and implement a much more optimized (and accurate - I added some wieghting of the little pieces) version. It turns out that GLSL doesn't know how to unroll nested loops - if I had coded it with a single loop, it would have been unrolled - but not with two loops, so it was running dynamic branching on the pixel shaderchuck_starchaser wrote:Won't pretend I understand anything there, except perhaps that there's a nested loop scanning in x and y; just thought I'd mention though chances are 99.999% you already know, it will run fast if the number of iterations, unrolled, fit within the length of the pipeline.
I think you just map the texture, instead of diffuse, specular, emissive or whatever, to "displace" (or something similar). Then you apply some tesselation (non-smoothing subsurfing), and you're set.chuck_starchaser wrote:Well, I'll just do a standard baking, for now; --better than no baking--; and a highly subdivided one if you want, later; just need to find out how to convert the bump-map to geometry...
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Can't find... Closest I came is this NVidia demo I downloaded, but it uses 3D textures instead of normal maps, for self-occlusion, and all the files are in weird formats; well, all textures are .dds; problem is you can't tell what they are by looking at the filename... And all the models are .nmb, whatever the heck that is...
Tons of models out there for download, but nothing complete...
Tons of models out there for download, but nothing complete...
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
I found a station from 2001, as an LWO, with bumpmaps and all, loaded it into Blender. The blender file seems to be okay
http://www.deeplayer.com/claudio/stationV.blend
though it uses multiple textures and tiling textures, of course...
I tried exporting to .obj, tho, and, looking at the .mtl file, I notice the bumpmaps didn't get exported. I'm putting the zip there anyways, as you probably need those bmp's in it... Hope you can export well to Ogre mesh.
http://www.deeplayer.com/claudio/stationV.zip
http://www.deeplayer.com/claudio/stationV.blend
though it uses multiple textures and tiling textures, of course...
I tried exporting to .obj, tho, and, looking at the .mtl file, I notice the bumpmaps didn't get exported. I'm putting the zip there anyways, as you probably need those bmp's in it... Hope you can export well to Ogre mesh.
http://www.deeplayer.com/claudio/stationV.zip
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Update
Ok... lots of bugfixes (you can't imagine how many errors there were - proof that high precision in GI is overrated).
Overrated and all... look how much improvement the bugfixes brought:
Indirect only - shot 1
(no direct lighting in this environment - proof that we can depend on GI with lightless environments, which aren't uncommon - like inside planetary shadows)
Indirect only - shot 2
Indirect only - shot 2
Indirect + Direct - shot 1
PS: And guess what... without the bugs, it runs faster
Overrated and all... look how much improvement the bugfixes brought:
Indirect only - shot 1
(no direct lighting in this environment - proof that we can depend on GI with lightless environments, which aren't uncommon - like inside planetary shadows)
Indirect only - shot 2
Indirect only - shot 2
Indirect + Direct - shot 1
PS: And guess what... without the bugs, it runs faster
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Looking very natural. So, I take it "Indirect" means that there's no standard OGL lighting, but GI only? And the last one has some OGL light to extend dynamic range?
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
So, if I'm beginning to understand something, diffuse lighting there works like environment mapping, exept that it uses only the surface normal;-- and the cube map is super-ultra-mega filtered?
That's probably more correct than the ambient occlusion feature in Blender's integrated renderer, in that it takes angle into account. I just can't imagine how you do self-occlusion, if you do. But then again, I can't imagine how you do or think of doing self-occlusion in specular environment mapping, either; unless there's a cone of visibility quaternion stored in each vertex of the mesh or something...
That's probably more correct than the ambient occlusion feature in Blender's integrated renderer, in that it takes angle into account. I just can't imagine how you do self-occlusion, if you do. But then again, I can't imagine how you do or think of doing self-occlusion in specular environment mapping, either; unless there's a cone of visibility quaternion stored in each vertex of the mesh or something...
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Bingo - I'll use Blender's radiosity bakings to get such a quaterion, though it wouldn't be a quaterion, rather, a rough sampling of from which directions light can come through (and how much of it) - then I adjust filtering to do that - take that much light from those directions. Cool... huh?chuck_starchaser wrote:But then again, I can't imagine how you do or think of doing self-occlusion in specular environment mapping, either; unless there's a cone of visibility quaternion stored in each vertex of the mesh or something...
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
That's super cool! So you'll need bakings from six directions, or is this using different color lights from different directions?
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Better maximize info than minimize size, since vertices are so much fewer than, and improve the value of so many more, texels.klauss wrote: I think I can summarize the information into a single 4-component channel, but I'm not certain. I'd love to.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Yes, but that info has to be transferred to the pixel shader, and it takes up vector slots - add the matrix I have to pass (another 3 slots), and they're 5 slots only for GI info - it's a lot... I know... 5... 4... not much of a difference, the matrix is probably the worst offender, but still I really feel there's a way to do it - yet I feel like you... maximize info... it's just a slot... arghh... decisions, decisions...
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
I understand GPU's understand quaternions. That would save 5 out of 9 floats... if my info is right...
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
It doesn't, but I could code everything necessary to teach it.
Thing is, you trade register space for performance - and performance is a bit a higher priority right now (in fact, one of the optimizations was by sending the matrix instead of building it, as I was doing before).
Also, since it's an orthonormal matrix, I could send only two vectors, and derive the third with an optimized cross-product (no division, since vectors are normalized).
But... well... it's all trading one resource by the other - so, I say again, decisions... decisions...
I think I'll settle for having the full information in the vertex shader and, if I want, I can compress it there (and send it compressed to the pixel shader) - yes, that sounds like a nice option.
Thing is, you trade register space for performance - and performance is a bit a higher priority right now (in fact, one of the optimizations was by sending the matrix instead of building it, as I was doing before).
Also, since it's an orthonormal matrix, I could send only two vectors, and derive the third with an optimized cross-product (no division, since vectors are normalized).
But... well... it's all trading one resource by the other - so, I say again, decisions... decisions...
I think I'll settle for having the full information in the vertex shader and, if I want, I can compress it there (and send it compressed to the pixel shader) - yes, that sounds like a nice option.
-
- Site Administrator
- Posts: 1089
- Joined: Thu Jan 02, 2003 10:07 am
- Contact:
This is where the Programmable GPU is coming. The later Graphics cards Nvidia' > G70 and ATi > 1x00 I think support this kind of opperation.chuck_starchaser wrote:I understand GPU's understand quaternions. That would save 5 out of 9 floats... if my info is right...
I know you believe you understand what you think I said.
But I am not sure you realize that what you heard is not what I meant.
Wing Commander Universe Forum | Wiki
Wing Commander: The Wasteland Incident
But I am not sure you realize that what you heard is not what I meant.
Wing Commander Universe Forum | Wiki
Wing Commander: The Wasteland Incident
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
[CRAZY... NUTS]
Could have a texture where each pixel is indexed by vertex number, containing all the extra vertex info. Is there a 75-color format?
[/CRAZY... NUTS]
Could have a texture where each pixel is indexed by vertex number, containing all the extra vertex info. Is there a 75-color format?
[/CRAZY... NUTS]
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 1832
- Joined: Sat Jan 15, 2005 10:21 pm
- Location: State of Denial
- Contact:
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Exactly, well, roughly 75klauss wrote:Actually, he probably meant 75-channel.
Lot's of info for the vertex shader, is what I was thinking. So, if for each vertex you have a vertex number, splitting the bits of that number and using them as U,V indexes into this (3D) texture. So, we could use some tool (mesher?) to put data from bakings from, say, 12 different directions (dodecahedral), into 3 layers of this 3D texture (3x4=12); IF, of course, that were as easy to process as only 6 directions and of benefit.I guess you could have a 4*2^n-channel one if you use cubic textures.
It's a nice way of getting lots of information to the pixel shader without having to bind the texturing coordinates - nice thinking.
Though... quite overkill (hence the "crazy nuts")
( OT: I'm going to see a doctor this afternoon. /OT )
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Texture samplers on the VS?chuck_starchaser wrote:Lot's of info for the vertex shader, is what I was thinking. So, if for each vertex you have a vertex number, splitting the bits of that number and using them as U,V indexes into this (3D) texture. So, we could use some tool (mesher?) to put data from bakings from, say, 12 different directions (dodecahedral), into 3 layers of this 3D texture (3x4=12); IF, of course, that were as easy to process as only 6 directions and of benefit.
That's vs3... veeery advanced stuff, and Ogre doesn't support it yet (though they're working on it, it's in the list for Eihort - the upcoming version). Or was it that they added that to Dagon (the current RC)? Can't remember. Anyway... veeery advanced stuff... I see it much more likely for passing info to the pixel shader (and, since VS-to-PS varying attributes are a scarce resource, it makes a lot of sense).
Good - I hope it's nothing too serious. Good luck.chuck_starchaser wrote:( OT: I'm going to see a doctor this afternoon. /OT )