milanm wrote:All you have to do to fix the "issue" is remove the "/6". You don't need it. Also in my tests actually max() operation worked better than +.
Right, seems to be normalized automagically,
don't know why I added that /6 just before posting and without testing aparently haha, thanks Milan.
I don't see how to use max() function here,
but anyway addition seems to work just fine now and exactly as Simowlabrim expects :
blue sphere is not visible in reflection or refraction
- Code: Select all
shader raytype_contribution(
float cam = 1 [[string label = "Camera", float min=0, float max=1]],
float shad = 1 [[string label = "Shadow", float min=0, float max=1]],
float AO = 1 [[string label = "Ambient occlusion", float min=0, float max=1]],
float diff = 1 [[string label = "Diffuse", float min=0, float max=1]],
float refl = 1 [[string label = "Reflection", float min=0, float max=1]],
float refr = 1 [[string label = "Refraction", float min=0, float max=1]],
output color c = 0
)
{
c = cam*raytype("camera") + shad*raytype("shadow") + AO*raytype("AO")
+ diff*raytype("diffuse") + refl*raytype("reflection") + refr*raytype("refraction");
}
milanm wrote:I have some normal mapping scripts to release that I've been working on for a while.
Nice, I'm waiting for this one !
(tried on my side but gave up)