Home > Materials > Other > Checkerboard > View Source

View Source

<!--Generated by Cindigo 1.1.10-->
<!--Using TinyXml-->
<!--Developed by: Yves Coll? aka 'fused'-->
<scenedata>
    <material>
        <name>nullMat</name>
        <null_material />
    </material>
    <material>
        <name>checkerboard</name>
        <diffuse>
            <albedo>
                <shader><shader>
			<![CDATA[          
			# checkerboard

			def eval(vec3 pos) vec3 :
				vec3(
					if(
						eq(
							add(
								if(gt(mod(mul(
									doti(
									getTexCoords(0)),
									4.0   # this value controls the tiles in u direction
								),2.0),1.0),1,0),

								if(gt(mod(mul(
									dotj(
									getTexCoords(0)),
									4.0   # this value controls the tiles in v direction
								),2.0),1.0),1,0)
							),1
						),0.75,0.025 # these values control the color
					)
				)
			]]>
		</shader></shader>
            </albedo>
        </diffuse>
    </material>
</scenedata>