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


openshadi...@...
 

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

New issue 48 by larrygritz: texture() should take optional param for missing texture
http://code.google.com/p/openshadinglanguage/issues/detail?id=48

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
basis?

Opinions?



--
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:
http://code.google.com/hosting/settings


openshadi...@...
 

Updates:
Cc: larrygritz
Labels: Type-Enhancement Priority-Medium Milestone-20100210

Comment #1 on issue 48 by larrygritz: texture() should take optional param for missing texture
http://code.google.com/p/openshadinglanguage/issues/detail?id=48

Sample comment (I'm just testing the email)

--
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:
http://code.google.com/hosting/settings


openshadi...@...
 

Comment #2 on issue 48 by jonogibbs: texture() should take optional param for missing texture
http://code.google.com/p/openshadinglanguage/issues/detail?id=48

I would want a separate color per shader, and would not like 2b. And "fill" is a
float, and I'd not always want the missing color to be greyscale. I would prefer (1).

--
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:
http://code.google.com/hosting/settings


openshadi...@...
 

Comment #3 on issue 48 by larrygritz: texture() should take optional param for missing texture
http://code.google.com/p/openshadinglanguage/issues/detail?id=48

Agreed. After I posted that, I was convinced from internal discussion that it needed
to be a shader decision (example: you might want missing color texture to be a
different "average" than a missing displacement amount). And yes, I'm going to make
it a color.


--
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:
http://code.google.com/hosting/settings