Material Database

View Source

<?xml version="1.0" encoding="utf-8" ?>
<scenedata>
    <material>
        <name>Eyehurt</name>
        <diffuse>
            <albedo>
                <shader>
                    <shader>
                        <![CDATA[def dist(vec2 a, vec2 b) real : length(b - a)
def dist(vec3 a, vec3 b) real : length(b - a)

def eval(vec3 i) vec3 :
  if(
    dist(
      vec2(
        fract(sin(doti(getTexCoords(0)) + dotj(getTexCoords(0))) * 4.0),
        fract(dotj(getTexCoords(0)) * 4.0)
      ),
      vec2(0.5, 0.5)
    ) > 0.5,
    vec3(0.8,0.1,0.1),
    vec3(0.1,0.1,0.8)
  )]]>
</shader>
                </shader>
            </albedo>
            <random_triangle_colours>false</random_triangle_colours>
            <layer>0</layer>
        </diffuse>
    </material>
</scenedata>

-->