+1
Under review

Sin() and Clamp0-1() producing black

zoltan erdokovy 10 years ago updated by Freya Holmér (Developer) 10 years ago 10
Time.t linked to Sin() linked to Clamp 0-1. It produces a black so deep that it's black in every blending mode.
Do you mean in the shader or in the node previews?
Oh yes sorry: the quad preview mesh, 50% gray background, dx9.
Do you have them in this order?

Clamp0-1 <- Sin <- Time
Hm I've just noticed this error in the console:

D3D shader assembly failed with: (11): error X6061: _sat not permitted with SINCOS instruction.
Oh, yikes, that sounds scary. Seems more like an error in Unity's translation from CG to assembly
A dirty fix is this:
Clamp0-1 <- Add(0.0001) <- Sin <- Time
Strange really, I can't see why you would get that error.

Anyhow, you probably don't want to use clamp0-1 right after sin, that will give you a bump, followed by a flat line, then another bump, etc.

If you want a sine from 0 to 1, use the remap node instead, and remap from -1, 1 to 0, 1
+1
More info: http://acegikmo.com/shaderforge/wiki/index.php?title=Waveforms
I wanted the bumps. :) The wiki is great!