#
# shader-defaults.txt
#
# This file summarizes current DirectViz options for OpenRTRT surface shaders 
# with default values, using Open Inventor file syntax. 
# It is for information only and is not used as configuration file.
# Options strings specify the range of possible values when different from 
# the interval [0-1]. This  can be used for implementing shader editors.
#
# See Open Inventor User's Guide for information about surface shaders.
#
# Parameters for rendering objects and light shaders are also described at the end
# of this file for advanced use.
#
#


########## RTX surface shaders ##############

Common options :

"bool receiveShadow false"
"bool softShadows false"
"bool wireframe false"
"bool glossySurfaces false"
"bool fuzzyLights false"
"1i numFuzzySamples 1 1 24"
			

DirectVizGeneralShader
{
   name "RTXDiffuse"
   file "libRTX"
   options [
            "color diffuseColor .5    .5    .5"
            "color emissiveColor 0     0     0"
            "texture <null-string>"
           ]
}

DirectVizGeneralShader
{
   name "RTXPhong"
   file "libRTX"
   options [
            "1f ambientIntensity      0.1  0    1"
			"color emissiveColor      0	   0	0"
			"color diffuseColor       1    1    1"
			"color specularColor      1    1    1"
            "color transparent        0    0    0"
            "color reflective         0    0    0"
			"1f shininess             64   0   512"
			"texture <null-string> "
			"bumpMap <null-string> "
			"alphaMap <null-string> "
	   ]
}    

DirectVizGeneralShader
{
   name "RTXGlass"
   file "libRTX"
   options [
	    "1f bindex 1.517 1 10"
	    "1f reflectivity 0.1 0 1"
	    "1f reflectionFilterAmount 0.0 0.0 1.0"	    
	    "color reflectionFilter 1.0 1.0 1.0"
	    "1f refractionFilterAmount 0.0 0.0 1.0"
 	    "color refractionFilter 1.0 1.0 1.0"
	    "1f refractionFilterScale 1 0.0001 1000"
	    "bool oneSidedGlass      false"
		"bumpMap <null-string> "
	   ]
}

DirectVizGeneralShader
{
   name "RTXFresnelPhong"
   file "libRTX"
   options [
        "1f ambientIntensity      0.1  0    1"
		"color emissiveColor      0	   0	0"
		"color diffuseColor       1    1    1"
		"color specularColor      1    1    1"
        "color transparent        0    0    0"
        "color reflective         0    0    0"
		"1f shininess             64   0   512"
		"texture <null-string> "
		"bumpMap <null-string> "
		"alphaMap <null-string> "
			
	    "1i fresnelMethod         1    1    3 Method1|Method2|Method3"
	    "1f bindex                1.2 1 10"
	    "1f bias                  0.000 -1 1"
	    "1f scale                 1.000 -0 10"
	    "1f index                 1.000 1 10"
	   ]
}


DirectVizEnvironmentShader
{
   name "RTXEnvironment"
   file "libRTX"
   options [ 
            "bool visibleForDirect            true"
            "bool visibleForReflections       true"
            "bool visibleForRefractions       true"
            "bool visibleForTransparency      true"
            "1i upDirection 1 0 2 X_UP|Y_UP|Z_UP"
            "color color 0     0     0"
            "1f scale 1     1E-3   100"
			"texture <null-string> "
			"3f shadowPlaneOrigin 0 0 0"
			"3f shadowPlaneNormal 0 1 0"
			"1f shadowIntensity 0.5"
           ]
}



############## Light shaders  ###############
#
#         *** For advanced use ***
#
# Note: Open Inventor lights are automatically translated into 
# appropriate light shaders (Point, Directional or Spot).
#
# Advanced users may use light shaders below for more controlled
# lighting. 
#
# Note: DirectViz default values may differ from values below.
#

#
############ RTX light shaders ##############
#

DirectVizLightShader
{
   name "RTXPointLight"
   file "libRTX"
   options [
            "3f position   0    0    0",
            "3f intensity  1    1    1 0 100",
			"1f atten0 1",
			"1f atten1 0",
			"1f atten2 0",
			"bool castShadow true"
           ]
}

DirectVizLightShader
{
   name "RTXSpotLight"
   file "libRTX"
   options [
            "3f position  0    0    0",
            "3f intensity  1    1    1",
			"3f direction 0   -1    0",
			"1f atten0 1",
			"1f atten1 0",
			"1f atten2 0",
			"1f minAngle 0 0 1.570796327",
			"1f maxAngle 1 0 1.570796327",
			"bool castShadow true"
           ]
}

DirectVizLightShader
{
   name "RTXDirectionalLight"
   file "libRTX"
   options [
            "3f intensity 1    1    1",
			"3f direction 0    0    1",
			"bool castShadow true"
           ]
}


########## Rendering objects  ###############
#
#      *** For advanced use ***
#
# A number of parameters can be set for rendering objects. 
# The most important ones are set through environment variables 
# (see SoPreferences).
#
# Notes: 
# - The rendering object node must correspond to current rendering 
#   object, which cannot be changed after DirectViz has been activated.
# - The parameters below can be only set once and cannot be changed 
#   after DirectViz is activated.
# - DirectViz default values for rendering object parameters
#   can differ from values below.
# 


DirectVizRenderingObject
{
   options [ 
		"bool receiveShadow false"
		"bool wireframe false"
		"bool softShadows false"
		"bool glossySurfaces false"
		"bool fuzzyLights false"
        
        "bool adaptiveOversampling false",
        "bool adaptiveOversamplingVisualize false",
	    "1i recursionLimit 5    1    99",
	    "1i samplesPerPixel     1    1    99",
	    "1i numFuzzySamples     1    1    24",
	    
	    "1f reflectiveAccuracy    0.01 0.01 0.5",
	    "1f refractiveAccuracy    0.01 0.01 0.5",
	    "1f transparentAccuracy   0.01 0.01 0.5",
	    "1f rayEpsilon            0.01  0.00001    100",
	   ]
}

#
# 1i samplesPerPixel This parameter specifies the number of primary rays
# shoot for single image pixel. Higher values increase quality, but decrease
# speed. Using accumulation should be prefered (see User Guide). 
#
# 1f reflectiveAccuracy This parameter specifies accuracy for reflective
# rays. Higher values increase quality, but decrease speed.
#
# 1f refractiveAccuracy This parameter specifies accuracy for refractive
# rays. Higher values increase quality, but decrease speed.
#
# 1f transparentAccuracy This parameter specifies accuracy for transparency
# rays. Higher values increase quality, but decrease speed.
#
# 1f rayEpsilon This parameter is used to avoid intersection artifacts due
# to the floating point precision.

# bool fuzzyLights This parameter enables fuzzy effects produced
# by fuzzy light sources, i.e. smooth shadows. Enabled fuzzy light effects
# can be also disabled on a per shader basis by the shader parameter with
# the same name. Disabled fuzzy light effects are disabled globally for the
# complete scene.

# bool glossySurfaces This parameter enables glossy effects produced
# by fuzzy surface shaders, e.g. glossy reflections and refractions.
# Enabled fuzzy surface effects can be also disabled on a per shader basis
# by the shader parameter with the same name. Disabled fuzzy surface
# effects are disabled globally for the complete scene.

# 1i numFuzzySamples Number of samples used to generate glossy effects
# and soft shadows. Higher values increase quality, but decrease speed.
# Attention: this parameter may have considerable performance impact!

# bool adaptiveOversampling This parameter enables adaptive oversampling.
# The number of shot primary rays will depend on the color difference
# of the neighbouring pixels.

# bool adaptiveOversamplingVisualize This parameter enables visualization
# of the adaptive oversampling. In this mode the pixel color is
# changed accordingly to the number of shot primary rays. The resulting
# colors are in range from green (minimal number of rays) to red (maximal
# number of rays).
#
#
