Jump to content

Aliasing In Procudural Shader


photex

Recommended Posts

Hi folks,

I'm looking for advice on handling the immense amount of aliasing my fishscales shader is capable of. Talking to keyframe on irc helped me out a lot and thanks to this I'm trying to understand how to apply smooth to my shader instead of my basic conditionals.

My shader currently uses: (tt < apt)?colorA:colorB; where apt == abs(sin(radians(s))

smooth returns 0 - 1 so I figure that can drive a color mix, but what is a way to determine a threshold to my abs(sin(s)) shenanigans? Is filterstep related to this?

Any help, comments, jokes, war stories, etc.. all greatly appreciated. :)

_chip

-----------

I suppose one step might be spelling "Procedural" correctly ;)

Edited by photex
Link to comment
Share on other sites

indeed filterstep was the magic. Someone correct me if I'm wrong but it's like a magic version of smooth where you only need to know the edge/threshold and it works the rest out for you. :)

so now instead of:

(tt<apt)?colorA:colorB;

I'm doing:

float bias = filterstep(apt, tt, "filter", "box", "width", 2);

vector surfacecolor = vop_colormix(colorA, colorB, bias, 2);

This has introduced some new problems for me though in areas where more than two colors converge in the pattern.

As always, I love advice, ideas, etc.. :)

_chip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...