testing: Cut render-* test resolution in half to speed up testing (#2131)
The time it takes to run a full testsuite was slowly creeping up to an inconvenient time on CI. The most expensive test are the `render-*` tests. Cut all of their resolutions in half to speed up CI runs. Update a lot of reference images. But after updating the ref images we need to fully pass CI (and pass on my work machine and my personal laptop), I could see that there were a number of `testsuite/render-*/ref/*.exr` files that did NOT get updated in this process -- we must conclude that they are old references that are no longer needed, so I deleted them. I also noticed that testsuite/render-material-layer had no ref images updated, and some git investigation reveals that this test that was added in 2017 was NEVER in testing.cmake and thus never ran in CI at all. So just remove it. Signed-off-by: Larry Gritz <lg@larrygritz.com>
This commit is contained in:
@@ -374,7 +374,7 @@ macro (osl_add_all_tests)
|
||||
render-mx-sheen
|
||||
render-mx-medium-vdf
|
||||
render-mx-medium-vdf-glass
|
||||
render-microfacet render-oren-nayar
|
||||
render-microfacet render-oren-nayar
|
||||
render-spi-thinlayer
|
||||
render-uv render-veachmis render-ward
|
||||
render-raytypes
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,4 +11,4 @@ allowfailures = 5
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 4 --options statistics:level=1 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 4 --options statistics:level=1 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,6 @@ failpercent = 0.5
|
||||
hardfail = 0.035
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 256 256 -aa 4 --llvm_opt 13 bumptest.xml out.exr")
|
||||
command = testrender("-r 128 128 -aa 4 --llvm_opt 13 bumptest.xml out.exr")
|
||||
|
||||
# Note: we pick this test arbitrarily as the one to verify llvm_opt=13 works
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,4 +7,4 @@
|
||||
failthresh = 0.01
|
||||
failpercent = 1
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 256 256 -aa 8 bunny.xml out.exr")
|
||||
command = testrender("-r 128 128 -aa 8 bunny.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,6 +7,6 @@
|
||||
failthresh = 0.01
|
||||
failpercent = 1
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 256 256 -aa 4 --llvm_opt 12 cornell.xml out.exr")
|
||||
command = testrender("-r 128 128 -aa 4 --llvm_opt 12 cornell.xml out.exr")
|
||||
|
||||
# Note: we pick this test arbitrarily as the one to verify llvm_opt=12 works
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,4 +7,4 @@
|
||||
failthresh = 0.01
|
||||
failpercent = 1
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 256 256 -aa 8 scene.xml out.exr")
|
||||
command = testrender("-r 128 128 -aa 8 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -5,4 +5,4 @@
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 20 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 20 scene.xml out.exr")
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright Contributors to the Open Shading Language project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
shader
|
||||
checkerboard
|
||||
[[ string description = "Procedural checkerboard" ]]
|
||||
(
|
||||
float s = u
|
||||
[[ string description = "s coordinate for the lookup",
|
||||
float UImin = 0, float UIsoftmax = 1 ]],
|
||||
float t = v
|
||||
[[ string description = "t coordinate for the lookup",
|
||||
float UImin = 0, float UIsoftmax = 1 ]],
|
||||
float scale_s = 4
|
||||
[[ string description = "scale factor for s coordinate" ]],
|
||||
float scale_t = 4
|
||||
[[ string description = "scale factor for t coordinate" ]],
|
||||
color Ca = color(1, 1, 1)
|
||||
[[ string description = "color of even squares" ]],
|
||||
color Cb = color(0, 0, 0)
|
||||
[[ string description = "color of odd squares" ]],
|
||||
output color Cout = 0
|
||||
[[ string description = "Output color",
|
||||
float UImin = 0, float UImax = 1 ]],
|
||||
output float Fout = 0
|
||||
)
|
||||
{
|
||||
// TODO: anti-alias
|
||||
float cs = fmod(s * scale_s, 2);
|
||||
float ct = fmod(t * scale_t, 2);
|
||||
if ((int(cs) ^ int(ct)) == 0)
|
||||
Cout = Ca;
|
||||
else
|
||||
Cout = Cb;
|
||||
|
||||
Fout = luminance(Cout);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright Contributors to the Open Shading Language project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
surface
|
||||
emitter
|
||||
[[ string description = "Lambertian emitter material" ]]
|
||||
(
|
||||
float power = 1
|
||||
[[ string description = "Total power of the light",
|
||||
float UImin = 0 ]],
|
||||
color Cs = 1
|
||||
[[ string description = "Base color",
|
||||
float UImin = 0, float UImax = 1 ]]
|
||||
)
|
||||
{
|
||||
// Because emission() returns a radiance that, integrated over all
|
||||
// angles, yields a power density of 1, we multiply by the desired
|
||||
// total power and divide by the total surface area. In this
|
||||
// manner, the 'power' parameter gives the total power of the light
|
||||
// (e.g., in Watts) independently of its physical size or shape
|
||||
// (which may be changed to affect shadow softness without altering
|
||||
// overall illumination). N.B.: The total power is BEFORE Cs
|
||||
// filters the color!
|
||||
Ci = (power / surfacearea()) * Cs * emission();
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
<World>
|
||||
<Camera eye="0, 100, 300" look_at="0,0,0" fov="70" />
|
||||
<Option max_bounces="int 1" />
|
||||
<ShaderGroup>
|
||||
<Parameter scale_s="float 20" />
|
||||
<Parameter scale_t="float 20" />
|
||||
<Parameter Ca="color 0.1 0.1 0.1" />
|
||||
<Parameter Cb="color 0.5 0.5 0.5" />
|
||||
<Shader name="checkerboard" layer="tex" />
|
||||
<Shader name="matte" layer="layer1" />
|
||||
<ConnectShaders srclayer="tex" srcparam="Cout" dstlayer="layer1" dstparam="Cs" />
|
||||
</ShaderGroup>
|
||||
<Quad corner="-200,0,0" edge_x="400,0,0" edge_y="0,400,0" /> <!-- Back -->
|
||||
<Quad corner="-200,0,0" edge_x="0,0,400" edge_y="400,0,0" /> <!-- Botm -->
|
||||
|
||||
<!--
|
||||
<Sphere center="-60,15,120" radius="5" />
|
||||
<Sphere center="-20,15,120" radius="5" />
|
||||
<Sphere center=" 20,15,120" radius="5" />
|
||||
<Sphere center=" 60,15,120" radius="5" />
|
||||
-->
|
||||
|
||||
<ShaderGroup>
|
||||
<Parameter scale_s="float 10" />
|
||||
<Parameter scale_t="float 20" />
|
||||
<Parameter Ca="color 0.0 0.0 0.0" />
|
||||
<Parameter Cb="color 1 1 1" />
|
||||
<Shader name="checkerboard" layer="opac_tex" />
|
||||
<Parameter Kd="float 0" />
|
||||
<Parameter Ks="float 1" />
|
||||
|
||||
<Parameter Roughness="float 0.1" />
|
||||
<Parameter Specular_Color="color 1 1 1" />
|
||||
|
||||
<Shader name="ubersurface" layer="layer2" />
|
||||
<Parameter Kd="float 1" />
|
||||
<Parameter Ks="float 1" />
|
||||
<Parameter Kt="float 0.5" />
|
||||
|
||||
<Parameter Roughness="float 0.02" />
|
||||
<Parameter Diffuse_Color="color 0.8 0.2 0.2" />
|
||||
<Parameter Refraction_Color="color 0.8 0.0 0.0" />
|
||||
|
||||
<Shader name="ubersurface" layer="layer1" />
|
||||
<ConnectShaders srclayer="opac_tex" srcparam="Fout" dstlayer="layer1" dstparam="Opacity" />
|
||||
<ConnectShaders srclayer="layer2" srcparam="Out_Ci" dstlayer="layer1" dstparam="Next_Layer" />
|
||||
|
||||
</ShaderGroup>
|
||||
<Quad corner="-80,70, 20" edge_x="0,-60 ,90" edge_y="160,0,0" />
|
||||
|
||||
<ShaderGroup is_light="yes">
|
||||
<Parameter power="float 2000" />
|
||||
<Shader name="emitter" layer="layer1" />
|
||||
</ShaderGroup>
|
||||
<Sphere center="-90, 130, 50" radius="1" /> <!--Lite -->
|
||||
<Sphere center="-35, 130, 50" radius="5" /> <!--Lite -->
|
||||
<Sphere center=" 30, 130, 50" radius="10" /> <!--Lite -->
|
||||
<Sphere center=" 90, 130, 50" radius="20" /> <!--Lite -->
|
||||
|
||||
</World>
|
||||
@@ -1,19 +0,0 @@
|
||||
// Copyright Contributors to the Open Shading Language project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
surface
|
||||
matte
|
||||
[[ string description = "Lambertian diffuse material" ]]
|
||||
(
|
||||
float Kd = 1
|
||||
[[ string description = "Diffuse scaling",
|
||||
float UImin = 0, float UIsoftmax = 1 ]],
|
||||
color Cs = 1
|
||||
[[ string description = "Base color",
|
||||
float UImin = 0, float UImax = 1 ]]
|
||||
)
|
||||
{
|
||||
Ci = Kd * Cs * diffuse (N);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright Contributors to the Open Shading Language project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
|
||||
|
||||
surface
|
||||
phong
|
||||
[[ string description = "Phong specular material" ]]
|
||||
(
|
||||
float Ks = 1
|
||||
[[ string description = "Specular scaling",
|
||||
float UImin = 0, float UIsoftmax = 1 ]],
|
||||
float exponent = 10
|
||||
[[ string description = "Phong exponent (higher is sharper)",
|
||||
float UImin = 1, float UIsoftmax = 100 ]],
|
||||
color Cs = 1
|
||||
[[ string description = "Base color",
|
||||
float UImin = 0, float UImax = 1 ]]
|
||||
)
|
||||
{
|
||||
Ci = Ks * Cs * phong (N, exponent);
|
||||
}
|
||||
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
# Copyright Contributors to the Open Shading Language project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
#!/usr/bin/python
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 4 material-layer.xml out.exr")
|
||||
@@ -1,334 +0,0 @@
|
||||
// Copyright Contributors to the Open Shading Language project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
|
||||
//
|
||||
// ubersurface.osl
|
||||
//
|
||||
//
|
||||
// A demonstration of writing a production-like generalized surface shader in OSL
|
||||
// This shader combines diffuse, specular, refractive and emissive closure to create
|
||||
// a flexible material description.
|
||||
//
|
||||
// See the help metadata on the parameters for usage info. Hopefully much of it is
|
||||
// self-explanatory.
|
||||
//
|
||||
// Author: Adam S. Martinez
|
||||
// Date: August 5th, 2011
|
||||
// Soundtrack: Gojira - Flying Whales
|
||||
//
|
||||
// August 2013:
|
||||
// This update employs a simple material layering mechanism that allows
|
||||
// two ubersurface shaders to connect and composite in a consistent manner.
|
||||
// Connecting ubersurfaceB.Out_Ci to ubersurfaceA.Next_Layer results in
|
||||
// the appearance of ubersurfaceA over ubersurfaceB.
|
||||
//
|
||||
// In this logic, opacity of 0 will pass through the top layer and call the
|
||||
// Next_Layer. Refractive materials will filter Next_Layer according to
|
||||
// the Refraction_Color.
|
||||
//
|
||||
// See testsuite/render-material-layer for an example.
|
||||
//
|
||||
// Note: This shader uses the "absorption" closure keyword for
|
||||
// the microfacet_beckmann_refraction closure. This is currently
|
||||
// unsupported by the testrender application.
|
||||
//
|
||||
|
||||
|
||||
// The TEXTURE_PARAMS macro defines a set of parameters common to all texture maps.
|
||||
// The metadata provides parameter display hints to host applications. These metadata
|
||||
// blocks are in The Foundry's Katana format.
|
||||
#define TEXTURE_PARAMS(MAPNAME) \
|
||||
string Texture_ ## MAPNAME ## _Name = ""\
|
||||
[[ string widget = "filename", string help = "A texture file name", \
|
||||
string page = #MAPNAME ".Texture"]],\
|
||||
float Texture_ ## MAPNAME ## _Blur = 0.0\
|
||||
[[ string help = "The blur amount, as a portion of the image size.", \
|
||||
string page = #MAPNAME ".Texture"]], \
|
||||
float Texture_ ## MAPNAME ## _Width = 1.0 \
|
||||
[[ string help = "A multiplier on the surface derivatives. Lower \
|
||||
numbers cause larger resolution mip levels to be used.", \
|
||||
string page = #MAPNAME ".Texture"]], \
|
||||
string Texture_ ## MAPNAME ## _Wrap_Mode = "periodic"\
|
||||
[[ string widget = "popup", \
|
||||
string options = "black|clamp|file|mirror|periodic",\
|
||||
string help = "The U and V wrap mode for this texture. ", \
|
||||
string page = #MAPNAME ".Texture"]],\
|
||||
float Texture_ ## MAPNAME ## _Scale_U = 1.0\
|
||||
[[ string help = "Scales the U texture coordinate prior to texture lookup.", \
|
||||
string page = #MAPNAME ".Texture"]], \
|
||||
float Texture_ ## MAPNAME ## _Scale_V = 1.0\
|
||||
[[ string help = "Scales the V texture coordinate prior to texture lookup.", \
|
||||
string page = #MAPNAME ".Texture"]], \
|
||||
int Texture_ ## MAPNAME ## _Flip_U = 0\
|
||||
[[ string help = "Flips the U texture coordinate prior to texture lookup.", \
|
||||
string widget = "checkBox", \
|
||||
string page = #MAPNAME ".Texture"]], \
|
||||
int Texture_ ## MAPNAME ## _Flip_V = 0\
|
||||
[[ string help = "Flips the V texture coordinate prior to texture lookup.", \
|
||||
string widget = "checkBox", \
|
||||
string page = #MAPNAME ".Texture"]],
|
||||
|
||||
// The evaluate texture function manipulates the texture coordinates and executes the texture() call
|
||||
// because this function gets called via a macro (defined below), the results are stored in the output
|
||||
// parameter 'result.'
|
||||
void evaluateTexture( string texfile, float blur, float width, string wrap, float scale_u,
|
||||
float scale_v, int flip_u, int flip_v, float uu, float vv, output color result)
|
||||
{
|
||||
if(texfile != "")
|
||||
{
|
||||
float u_tex = uu ;
|
||||
float v_tex = vv ;
|
||||
|
||||
if(flip_u)
|
||||
u_tex = 1.0 - u_tex;
|
||||
|
||||
if(flip_v)
|
||||
v_tex = 1.0 - v_tex;
|
||||
|
||||
u_tex *= scale_u;
|
||||
v_tex *= scale_v;
|
||||
|
||||
result = texture(texfile, u_tex, v_tex, "width", width, "blur", blur, "swrap", wrap, "twrap", wrap);
|
||||
}
|
||||
}
|
||||
|
||||
// The following is a float version of the above. Note that the texture() call will return a float value
|
||||
// representing the first channel found in the texture file.
|
||||
void evaluateTexture( string texfile, float blur, float width, string wrap, float scale_u,
|
||||
float scale_v, int flip_u, int flip_v, float uu, float vv, output float result)
|
||||
{
|
||||
if(texfile != "")
|
||||
{
|
||||
float u_tex = uu ;
|
||||
float v_tex = vv ;
|
||||
|
||||
if(flip_u)
|
||||
u_tex = 1.0 - u_tex;
|
||||
|
||||
if(flip_v)
|
||||
v_tex = 1.0 - v_tex;
|
||||
|
||||
u_tex *= scale_u;
|
||||
v_tex *= scale_v;
|
||||
|
||||
result = texture(texfile, u_tex, v_tex, "width", width, "blur", blur, "swrap", wrap, "twrap", wrap);
|
||||
}
|
||||
}
|
||||
|
||||
// This macro allows us to easily call the evaluateTexture functions using the texture parameters defined by the
|
||||
// TEXTURE_PARAMS macro. The parameters are the map definition, which must have an equivalent TEXTURE_PARAMS
|
||||
// call in the parameter list, and a storage variable for the texture lookup result.
|
||||
#define TEXTURE_EVAL(MAPNAME, RESULT)\
|
||||
evaluateTexture(\
|
||||
Texture_ ## MAPNAME ## _Name,\
|
||||
Texture_ ## MAPNAME ## _Blur,\
|
||||
Texture_ ## MAPNAME ## _Width,\
|
||||
Texture_ ## MAPNAME ## _Wrap_Mode,\
|
||||
Texture_ ## MAPNAME ## _Scale_U,\
|
||||
Texture_ ## MAPNAME ## _Scale_V,\
|
||||
Texture_ ## MAPNAME ## _Flip_U,\
|
||||
Texture_ ## MAPNAME ## _Flip_V,\
|
||||
In_U,\
|
||||
In_V,\
|
||||
RESULT);
|
||||
|
||||
// The Shader
|
||||
surface
|
||||
ubersurface
|
||||
(
|
||||
float Opacity = 1
|
||||
[[ string help = "The overall opacity of the surface",
|
||||
string page = "Opacity",
|
||||
float UImin = 0, float UImax = 1]],
|
||||
|
||||
TEXTURE_PARAMS(Opacity)
|
||||
|
||||
float Kbump = 0
|
||||
[[ string help = "The amount to bump the surface by",
|
||||
string page = "Bump"]],
|
||||
|
||||
TEXTURE_PARAMS(Bump)
|
||||
|
||||
float Kd = 0.5
|
||||
[[ string help = "Diffuse closure weight",
|
||||
string page = "Diffuse",
|
||||
float UImin = 0, float UImax = 1]],
|
||||
|
||||
color Diffuse_Color = 1
|
||||
[[ string help = "Diffuse closure color",
|
||||
string page = "Diffuse"]],
|
||||
|
||||
TEXTURE_PARAMS(Diffuse)
|
||||
|
||||
float IOR = 1.33
|
||||
[[ string help = "The index of refraction for specular effects.",
|
||||
string page = "Specular"]],
|
||||
|
||||
float Roughness = 0.2
|
||||
[[ string help = "The surface roughness for specular effects. A value of 0 forces perfect reflection/refraction.",
|
||||
string page = "Specular",
|
||||
float UImin = 0, float UImax = 1]],
|
||||
|
||||
|
||||
float Ks = 0.5
|
||||
[[ string help = "Specular closure weight",
|
||||
string page = "Specular",
|
||||
float UImin = 0, float UImax = 1]],
|
||||
|
||||
color Specular_Color = 1
|
||||
[[ string help = "Specular closure color",
|
||||
string page = "Specular"]],
|
||||
|
||||
TEXTURE_PARAMS(Specular)
|
||||
|
||||
float Kt = 0
|
||||
[[ string help = "Transmissive, or refraction, closure weight.",
|
||||
string page = "Refraction",
|
||||
float UImin = 0, float UImax = 1]],
|
||||
|
||||
color Refraction_Color = 1
|
||||
[[ string help = "Refraction closure color",
|
||||
string page = "Refraction"]],
|
||||
|
||||
TEXTURE_PARAMS(Refraction)
|
||||
|
||||
color Absorption_Color = 0
|
||||
[[ string help = "Color to absorb inside a refractive volume.",
|
||||
string page = "Refraction"]],
|
||||
|
||||
float Ke = 0
|
||||
[[ string help = "Emissive, or incandescent, closure weight.",
|
||||
string page = "Emission"]],
|
||||
|
||||
color Emission_Color = 1
|
||||
[[ string help = "Emissive closure color.",
|
||||
string page = "Emission"]],
|
||||
|
||||
TEXTURE_PARAMS(Emission)
|
||||
|
||||
// These parameters are provided to use shading variables from external shaders
|
||||
normal In_Normal = N,
|
||||
|
||||
float In_U = u,
|
||||
|
||||
float In_V = v,
|
||||
|
||||
// Shader Layering
|
||||
output closure color Out_Ci = 0,
|
||||
closure color Next_Layer = 0
|
||||
|
||||
)
|
||||
{
|
||||
|
||||
// Nshading will store a modified N if bump mapping is used
|
||||
normal Nshading = In_Normal;
|
||||
|
||||
// Determine opacity and prepare a transparent closure
|
||||
float opacity = 1;
|
||||
TEXTURE_EVAL(Opacity, opacity)
|
||||
opacity *= Opacity;
|
||||
closure color transparencyClosure = transparent() * (1.0-opacity);
|
||||
|
||||
// For material layering we have to keep some extra stuff around...
|
||||
color refractionFilter = 1;
|
||||
|
||||
// Test for shadow rays and exit early, supplying only the transparency closure.
|
||||
if(raytype("shadow")) {
|
||||
Out_Ci = transparencyClosure;
|
||||
|
||||
//Naive layering of in shadow context
|
||||
if(isconnected(Next_Layer)){
|
||||
Out_Ci = Out_Ci + Next_Layer;
|
||||
}
|
||||
|
||||
} else {
|
||||
// Storage for weighted closures that we will accumulate at the end of this 'beauty' block
|
||||
closure color diffuseClosure = 0;
|
||||
closure color specularClosure = 0;
|
||||
closure color emissionClosure = 0;
|
||||
closure color refractionClosure = 0;
|
||||
|
||||
// Determine index of refraction based on which side we have hit.
|
||||
float eta = IOR;
|
||||
if(backfacing()) eta = 1.0/IOR;
|
||||
|
||||
// Bump
|
||||
if(Kbump) {
|
||||
float bumpTexture = 0;
|
||||
TEXTURE_EVAL(Bump, bumpTexture)
|
||||
bumpTexture *= Kbump;
|
||||
if(bumpTexture) {
|
||||
point Pbump = P + normalize(Nshading) * bumpTexture;
|
||||
Nshading = normalize(calculatenormal(Pbump));
|
||||
}
|
||||
}
|
||||
|
||||
// Diffuse
|
||||
if(Kd) {
|
||||
color diffuseTexture = color(1);
|
||||
TEXTURE_EVAL(Diffuse, diffuseTexture)
|
||||
diffuseClosure = diffuse(Nshading) * Kd * Diffuse_Color * diffuseTexture;
|
||||
}
|
||||
|
||||
// Specular
|
||||
if(Ks) {
|
||||
if(Roughness <= 0.005) {
|
||||
specularClosure = reflection(Nshading, eta);
|
||||
} else {
|
||||
specularClosure = microfacet_beckmann(Nshading, Roughness, eta);
|
||||
}
|
||||
|
||||
color specularTexture = color(1);
|
||||
TEXTURE_EVAL(Specular, specularTexture)
|
||||
specularClosure *= specularTexture * Ks * Specular_Color;
|
||||
}
|
||||
|
||||
// Emission
|
||||
if(Ke) {
|
||||
// Because emission() returns a radiance that, integrated over all
|
||||
// angles, yields a power density of 1, we multiply by the desired
|
||||
// total power and divide by the total surface area. In this
|
||||
// manner, the 'Ke' parameter gives the total power of the light
|
||||
// (e.g., in Watts) independently of its physical size or shape
|
||||
// (which may be changed to affect shadow softness without altering
|
||||
// overall illumination). N.B.: The total power is BEFORE Emission_Color
|
||||
// filters the color!
|
||||
color emissionTexture = color(1);
|
||||
TEXTURE_EVAL(Emission, emissionTexture)
|
||||
emissionClosure = emission() * (Ke / surfacearea()) * Emission_Color * emissionTexture;
|
||||
}
|
||||
|
||||
|
||||
// Refraction
|
||||
refractionFilter = 1.0-opacity;
|
||||
if(Kt) {
|
||||
if(Roughness <= 0.005) {
|
||||
refractionClosure = refraction(Nshading, eta, "absorption", Absorption_Color);
|
||||
} else {
|
||||
refractionClosure = microfacet_beckmann_refraction(Nshading, Roughness, eta, "absorption", Absorption_Color);
|
||||
}
|
||||
|
||||
color refractionTexture = color(1);
|
||||
TEXTURE_EVAL(Refraction, refractionTexture)
|
||||
refractionClosure *= refractionTexture * Kt * Refraction_Color;
|
||||
// Attenuate diffuse by inverse of refraction Kt.
|
||||
diffuseClosure *= 1.0-Kt;
|
||||
refractionFilter = mix(color(1), refractionTexture * Refraction_Color, Kt*opacity );
|
||||
}
|
||||
|
||||
// Accumulate and output
|
||||
Out_Ci = ((diffuseClosure + specularClosure + emissionClosure) * opacity);
|
||||
|
||||
if(isconnected(Next_Layer))
|
||||
{
|
||||
Out_Ci = Next_Layer * refractionFilter + Out_Ci;
|
||||
} else {
|
||||
Out_Ci = Out_Ci + (refractionClosure*opacity) + transparencyClosure;
|
||||
}
|
||||
}
|
||||
|
||||
Ci = Out_Ci;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,4 +11,4 @@ allowfailures = 5
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 8 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 8 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,4 +9,4 @@ failpercent = 1
|
||||
allowfailures = 5
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 196 196 -aa 32 scene.xml out.exr")
|
||||
command = testrender("-v -r 98 98 -aa 32 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -9,4 +9,4 @@ failthresh = 0.05 # allow a little more LSB noise between platforms
|
||||
hardfail = 0.05
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 8 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 8 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -11,4 +11,4 @@ allowfailures = 5
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-v -r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -10,4 +10,4 @@ hardfail = 0.02
|
||||
allowfailures = 15
|
||||
idiff_program = "idiff"
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-v -r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -8,4 +8,4 @@ failthresh = 0.03 # allow a little more LSB noise between platforms
|
||||
hardfail = 0.05
|
||||
failpercent = 1
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-v -r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
@@ -7,4 +7,4 @@
|
||||
failthresh = 0.03 # allow a little more LSB noise between platforms
|
||||
hardfail = 0.03
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 768 128 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-r 384 64 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
@@ -7,4 +7,4 @@
|
||||
failthresh = 0.03 # allow a little more LSB noise between platforms
|
||||
hardfail = 0.05
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 768 128 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-r 384 64 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,4 +7,4 @@
|
||||
failthresh = 0.01 # allow a little more LSB noise between platforms
|
||||
hardfail = 0.025
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 768 128 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-r 384 64 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
@@ -9,4 +9,4 @@ failpercent = 1
|
||||
hardfail = 0.35
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-v -r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -11,4 +11,4 @@ allowfailures = 5
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-v -r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -9,4 +9,4 @@ hardfail = 0.05
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 6 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 6 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -9,4 +9,4 @@ failpercent = 1
|
||||
allowfailures = 5
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 196 196 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-r 98 98 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -8,4 +8,4 @@ failthresh = 0.01
|
||||
failpercent = 1
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 196 196 -aa 32 scene.xml out.exr")
|
||||
command = testrender("-v -r 98 98 -aa 32 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -10,4 +10,4 @@ allowfailures = 5
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 6 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 6 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
@@ -9,4 +9,4 @@ failpercent = 1
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 4 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 4 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,4 +14,4 @@ allowfailures = 2
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-v -r 100 75 -aa 2 scene.xml out.exr")
|
||||
command = testrender("-v -r 50 38 -aa 2 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,4 +11,4 @@ allowfailures = 5
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -10,4 +10,4 @@ allowfailures = 3
|
||||
idiff_program = "idiff"
|
||||
|
||||
outputs = [ "out.exr" ]
|
||||
command = testrender("-r 320 240 -aa 16 scene.xml out.exr")
|
||||
command = testrender("-r 160 120 -aa 16 scene.xml out.exr")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user