PDA

View Full Version : Surface panel preview?



Anti-Distinctly
08-08-2008, 02:19 AM
I'm attempting to write a shader script, but there seems to be a problem when the preview sphere renders. I can't find out how to tell is this type of rendering is taking place or not.
The shader relies on object geometry and needs polygon IDs, which causes an error when rendering the preview sphere as I'm guessing it has no geometry.
Is there a flag or some way I can check for this situation?

Lightwolf
08-08-2008, 02:45 AM
The object ID passed to your shader will be one that isn't present in the scene.

Last time I checked it was always the same, so you might want to dump that out and use it as a constant to compare to.

Cheers,
Mike

Anti-Distinctly
08-08-2008, 05:41 AM
Thanks Mike.
Preview sphere id is 268468223 (as of 9.5 beta 1443).

Lightwolf
08-08-2008, 05:43 AM
Thanks Mike.
Preview sphere id is 268468223 (as of 9.5 beta 1443).
That looks reasonable, it's 0x10007FFF in hex.

Cheers,
Mike