Splatting2Edit and SplattingShaderEdit - what's going on?

Falagard

15-06-2006 20:37:39

Ya, what's going on, they're no longer available as texture modes.

tuan kuranes

16-06-2006 07:12:03

This is the end of texture mode as you know them.
No more texture mode writing (C++), only materials (text script).

You specify a "template" or "generic" material using some keyword and syntax you want to use in plsm2 and plsm2 will make it "paged" dynamically..

You just have to use keywords "Splatting, Alpha, Light, Coverage, Base, Horizon" instead of texture name in the material and plsm2 will dynamically substitute them, in order it encounters them in the technique.

Edit mode is now enabled for all "template" materials, using a cfg option "TextureModifiable=yes"

If you want to enable compression on a material, add "Decompress" keyword at the end of the name.

tuan kuranes

16-06-2006 07:16:13

But it's a bit wip for now, as previous texture mode naming check is still there even if no more needed... I'm on it.

But in your case use TextureModifiable=yes and SplattingShader (new version in CVS with keywords in it) and it should work.

Falagard

16-06-2006 07:44:16

Okay. I'm working on a vertex/pixel shader lit version of the SplattingShader, and want to have a different material if it's lit versus if it's not lit.

I was planning on modifying the old code you had previously to change the material name it looks for based on the options->lit value, but now what would I do?

tuan kuranes

16-06-2006 07:46:42

you want an option that make plsm2 loads a Lit material instead of a not Lit,or you want it too choose material upon user capabilities ?

Falagard

16-06-2006 08:01:48

Well the splatting shader already probably checks if the user can run shaders, and if not says it's not supported right, and falls back to a different texture mode? Or is it done differently now?

Basically here's my situation:

If the user has the ability to run vertex and pixel shaders, possibly limited to shader model 2, I'm going to be using lit version of SplattingShader which adds lighting to the splatting shader currently in multiple passes. I think you already handle this by iterating through all passes in the material for a texture mode and binding compression settings, which is what I need in my vertex programs.

If the user doesn't have the ability to run shaders, I need to fall back to a pre-calculated base texture (I think that's the term you use) which is just a single texture stretched across a page with all the splats baked into it.

I'm willing to add a new texture mode, or however it's done now, specific for the lighting supported version of the SplattingShader, so if it has to be a new texture mode called SplattingShaderLit then that's fine, but I was wondering the best way to fit it into your new architecture.

Clay

tuan kuranes

16-06-2006 08:07:26

Well the splatting shader already probably checks if the user can run shaders, and if not says it's not supported right, and falls back to a different texture mode? Or is it done differently now?
No same as before.

If the user has the ability to run vertex and pixel shaders, possibly limited to shader model 2
That still could be done using traditionnal "technique" selection of Ogre based on Video Card Capabilities.

The template instancing is done on the "BestTechnique".
So you just have to write a material with fallback techniques.