Issue 48 in openshadinglanguage: texture() should take optional param for missing texture


Status: New
Owner: larrygritz
CC: os...@...

New issue 48 by larrygritz: texture() should take optional param for missing texture

Currently, texture() lookups to nonexistent textures are an error (that
propagates up to the renderer). The shader team has suggested that it
would solve some awkwardness if there was an optional argument to texture,
somewhat similar to "fill", that gives a color value to use for entirely
missing textures (and it is not an error for this to occur). If the arg is
not supplied, it's an error to ask for texture that is not found.

I can think of a couple ways to do this:

(1) a separate "missing" color that is analogous to "fill" (fill is used
for missing channels in a present texture). Also a "missingalpha" for the
alpha case?

(2) just a bool that means whether or not a missing texture is an error.
(2a) just use the fill value when missing?
(2b) use a global value for missing texture value? (via
shadingsys->attribute) Do you need a different color on a shader-by-shader


You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

Join { to automatically receive all group messages.