psst! it's all fake nonetheless

Code: Select all
<albedo>
<shader>
<shader>
<![CDATA[
def eval(vec3 pos) vec3 :
vec3(
# this first if is to determine whether
# this is an odd or even course
if(
eq(
mod(
sub(
div(
dotj(
getTexCoords(0)
),64.0
),
mod(
dotj(
getTexCoords(0)
),64.0
)
),2.0
),0.0
),
#this is one course configuration
if(
and(
gte(
mod(
doti(
getTexCoords(0)
),128.0
),
div(
125.0,128.0
)
),
gte(
mod(
dotj(
getTexCoords(0)
),64.0
),
div(
61.0,64.0
)
)
),1.0,0.0
),
# this is the other course configuration
if(
and(
gte(
mod(
add(
doti(
getTexCoords(0)
),64.0
),128.0
),
div(
125.0,128.0
)
),
gte(
mod(
dotj(
getTexCoords(0)
),64.0
),
div(
61.0,63.0
)
)
),1.0,0.0
)
)
)
]]>
</shader>
</shader>
Users browsing this forum: No registered users and 1 guest