Squeak Class Documentation category index | class index  
 
B3DShaderPlugin
  category: VMConstruction-Plugins
  superclass: B3DEnginePlugin
  subclasses:

No comment. Sorry.

instance methods
  other
  loadPrimitiveLightSource
loadPrimitiveVertex
storePrimitiveVertex

  primitive support
  fetchLightSource:ofObject:
stackLightArrayValue:
stackMaterialValue:

  primitives
  b3dShadeVertexBuffer
b3dShaderVersion

  shading
  addPart:from:trackFlag:scale:
computeAttenuation
computeDirection
computeSpecularDirection
computeSpotFactor
dotProductOfFloat:withDouble:
inverseLengthOfDouble:
inverseLengthOfFloat:
shadeVertex

class methods
  translation
  declareCVarsIn:

instance methods
  other top  
 

loadPrimitiveLightSource


 

loadPrimitiveVertex

Load the necessary values from the current primitive vertex


 

storePrimitiveVertex

Store the computed output color back into the current primitive vertex.
Clamp the r,g,b,a part to be in the range 0-255.


  primitive support top  
 

fetchLightSource:ofObject:

Fetch the primitive light source from the given array.
Note: No checks are done within here - that happened in stackLightArrayValue:


 

stackLightArrayValue:

Load an Array of B3DPrimitiveLights from the given stack index


 

stackMaterialValue:

Load a B3DMaterial from the given stack index


  primitives top  
 

b3dShadeVertexBuffer

Primitive. Shade all the vertices in the vertex buffer using the given array of primitive light sources. Return true on success.


 

b3dShaderVersion

Return the current shader version.


  shading top  
 

addPart:from:trackFlag:scale:

Add the given light part to the output color, scaled by the given scale factor.
If the given flag is set in vbFlags then load the part from the primitive vertex


 

computeAttenuation

Compute the attenuation for the current light and vertex


 

computeDirection

Compute the direction for the current light and vertex


 

computeSpecularDirection

Computes
l2vSpecDir _ l2vSpecDir - vtx position safelyNormalized.


 

computeSpotFactor

Compute the spot factor for a spot light


 

dotProductOfFloat:withDouble:


 

inverseLengthOfDouble:


 

inverseLengthOfFloat:


 

shadeVertex


class methods
  translation top  
 

declareCVarsIn:

Note: This method must be implemented by all subclasses to declare variables.