Package codechicken.lib.render.lighting
Class LightModel
java.lang.Object
codechicken.lib.render.lighting.LightModel
- All Implemented Interfaces:
IVertexOperation
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface codechicken.lib.render.pipeline.IVertexOperation
IVertexOperation.VertexOperationRegistry -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLight(LightModel.Light light) intbooleanload(CCRenderState ccrs) Load any required references and add dependencies to the pipeline based on the current model (may be null) Return false if this operation is redundant in the pipeline with the given modelvoidoperate(CCRenderState ccrs) Perform the operation on the current render stateintGet the unique id representing this type of operation.setAmbient(Vector3 vec)
-
Field Details
-
operationIndex
public static final int operationIndex -
standardLightModel
-
-
Constructor Details
-
LightModel
public LightModel()
-
-
Method Details
-
addLight
-
setAmbient
-
apply
- Parameters:
colour- The pre-lighting vertex colour. RGBA formatnormal- The normal at the vertex- Returns:
- The lighting applied colour
-
load
Description copied from interface:IVertexOperationLoad any required references and add dependencies to the pipeline based on the current model (may be null) Return false if this operation is redundant in the pipeline with the given model- Specified by:
loadin interfaceIVertexOperation
-
operate
Description copied from interface:IVertexOperationPerform the operation on the current render state- Specified by:
operatein interfaceIVertexOperation
-
operationID
public int operationID()Description copied from interface:IVertexOperationGet the unique id representing this type of operation. Duplicate operation IDs within the pipeline may have unexpected results. ID should be obtained from CCRenderState.registerOperation() and stored in a static variable- Specified by:
operationIDin interfaceIVertexOperation
-
reducePlanar
-