psst! it's all fake nonetheless
Shader tests
crojack:
since there is currently no shader support in SkIndigo for the albedo property, i have been using the "linked igm" material type and editing the code in an igm file. i got the idea after using fused's checkerboard shader since it was the easiest way to get the code into the albedo entry in sketchy.
mark:
holoroom? /me runs off to google
since there is currently no shader support in SkIndigo for the albedo property, i have been using the "linked igm" material type and editing the code in an igm file. i got the idea after using fused's checkerboard shader since it was the easiest way to get the code into the albedo entry in sketchy.
mark:
holoroom? /me runs off to google
- PureSpider
- Posts: 1459
- Joined: Tue Apr 08, 2008 9:37 am
- Location: Karlsruhe, BW, Germany
- Contact:
crojack:
i forgot to mention you'll need to add another set of <shader> and </shader for the checkboard to work. sorry.
as far as further progress goes, ... peep the grid:
i forgot to mention you'll need to add another set of <shader> and </shader for the checkboard to work. sorry.
as far as further progress goes, ... peep the grid:
- Attachments
-
- the other side ... not so much
- im1222125730.png (316.21 KiB) Viewed 3721 times
-
- cool on one side
- im1222125104.png (786.97 KiB) Viewed 3722 times
ok well i think im stuck on this shader as i cant seem to get the courses to alternate the offset. my code is below. the problem lies in not being able to use the odd() function as given by Ono. i'm using reals and the function wants ints. i tried a work around for this but never-the-less it remains in grid form and not a CMU pattern as i'd hoped. any comments or solutions are welcome. thanks
i've used the 64 (8x8) and 128 (16x8) as the dimensions of my cmu blocks -- broken down into 1/8ths of an inch. i did this so the lines would be the width of the mortar joint (3/8")
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>
Sorry, meant "holodeck" I didn't know, it's "deck" in english, too, so I hoped I'd hit the word with "room"^^
http://en.wikipedia.org/wiki/Holodeck
to get ints from reals, use floor(real+0,5)
(or alternatively, ceil(real-0,5))
I wish I could see this with simple calc-signs.... As it is here, it looks pretty confusing, somehow....
http://en.wikipedia.org/wiki/Holodeck
to get ints from reals, use floor(real+0,5)
I wish I could see this with simple calc-signs.... As it is here, it looks pretty confusing, somehow....
Who is online
Users browsing this forum: Majestic-12 [Bot] and 138 guests
