Hi Experts,
Been trying to solve a school project for building a cross-hatching shaders using VOPMaterialBuilder. So far have been unsuccessful.
I've followed the formula online for creating GLSL cross-hatch shader but can't seem to make it work. Here is a link to the formula http://wesleygamedesigner.blogspot.co.nz/2013/04/cross-hatching-shader.html [wesleygamedesigner.blogspot.co.nz] from Wesley Chartrand's blog.
I've also attached my hip file, going through the network, it somewhat follows the construct of the simple formula. Alas, all I get is one black teapot.
Hope someone can advise.
Cheers,
Ariel
Cross Hatching
4269 1 0-
- ariel reyes
- Member
- 1 posts
- Joined: March 2014
- Offline
-
- eetu
- Member
- 606 posts
- Joined: May 2007
- Offline
Here you go. The main things I changed were the inputs. It needs to work in some sort of screen space coordinates instead of UVs, also I changed the shading to be an input instead of being fed by the pattern. Comparing with equality to zero is iffy in the rendering world. I changed the comparisons to smaller than an epsilon - you can use the epsilon value to control the width of the cross-hatching lines.
-
- Quick Links