Discussion:
Celestial objects and shaders
(too old to reply)
Erik Hofman
2017-07-20 09:12:22 UTC
Permalink
Hi,

Once Thorsten once mentioned he would like to be able to use the ALS
shaders on the Sun object and recently I came to the conclusion that
change the celestial object creation from code to loading an AC3d object
would make that possible.

Now I have code to load a textured moon 3d object and move it through
the sky keeping the moon phases. For the default renderer.

But the problem is that when I enable ALS I always get an untextured
fool moon object. Is there something ALS specific that I'm missing? Do I
need to apply a shader to get the textures visible for instance?

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Thorsten Renk
2017-07-20 11:35:46 UTC
Permalink
Post by Erik Hofman
Once Thorsten once mentioned he would like to be able to use the ALS
shaders on the Sun object and recently I came to the conclusion that
change the celestial object creation from code to loading an AC3d object
would make that possible.
Now I have code to load a textured moon 3d object and move it through
the sky keeping the moon phases. For the default renderer.
But the problem is that when I enable ALS I always get an untextured
fool moon object. Is there something ALS specific that I'm missing? Do I
need to apply a shader to get the textures visible for instance?
ALS is not in any way special C++ side, it's identical to Classic. The
only difference is in the effect definitions (which branch ALS to
different shaders than classic) and the actual shader code.

If you insert a 3d model with an effect that does not specifically branch
to ALS shaders, that object should be rendered in ALS just the same as in
Classic (which happens for instance if you use the chrome effect) - with
visual inconsistencies under some lighting, but not untextured or
otherwise broken.

My understanding is that currently the Moon works that way - it's a 3d
model that however gets white light (to protect it from being red by
sunset colors in Classic) - and that is how it appears in the scene.

So basically the only way I can imagine you can have an object untextured
in ALS is that your effect branches ALS to a different shader family, but
the effect declaration or the shader code is broken for some reason
whereas the Classic branch works.

* Thorsten
Erik Hofman
2017-07-20 12:33:25 UTC
Permalink
Post by Thorsten Renk
So basically the only way I can imagine you can have an object
untextured in ALS is that your effect branches ALS to a different shader
family, but the effect declaration or the shader code is broken for some
reason whereas the Classic branch works.
Ok, I seem to be doing something wrong still:
Adding the material animation to set the diffuse color the sphere make
the the moon completely invisible in non-ALS mode now.

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Loading...