Notifications
Clear all

[Closed] SDK Shader Ball

Using the SDK, Is there a way to get collect shader ball image similar to the way the material editor displays shaders?

1 Reply

Maybe this will direct your steps…

Checkout the SDK help and sample files:

virtual float EvalHiliteCurve(float x); 
 
Remarks:

This method is called to evaluate the hightlight curve that appears in the Shader user interface.

Note: This gets called from the DrawHilite() function which is [B][I]available to developers[/I] in \MAXSDK\SAMPLES\MATERIALS\SHADER\SHADERUTIL.CPP[/B]. 
DrawHilite() get called from the window proc HiliteWndProc() in the same file. This code is available to developers to use in their Shader dialog procs.

Parameters:

float x

The input value.

Return Value:

The output value on the curve. A value of 1.0 represents the top of the curve as it appears in the UI. Values greater than 1.0 are okay and simply appear off the top of the graph.

Default Implementation:

{ return 0.0f; }



virtual float EvalHiliteCurve2(float x, float y, int level = 0); 

Remarks:

This is the highlight curve function for the two highlight curves which intersect and appear in the UI, for instance in the Anistropic shader.

Parameters:

float x

The x input value.

float y

The y input value.

int level = 0

This is used by multi-layer shaders to indicate which layer to draw. The draw highlight curve routines use this when redrawing the graph.

Return Value:

The output value of the curve.

Default Implementation:

{ return 0.0f; }