Package gaiasky.util.gdx.shader
Class DepthIntShader
java.lang.Object
gaiasky.util.gdx.shader.BaseIntShader
gaiasky.util.gdx.shader.DefaultIntShader
gaiasky.util.gdx.shader.DepthIntShader
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,IntShader
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class gaiasky.util.gdx.shader.DefaultIntShader
DefaultIntShader.Inputs, DefaultIntShader.SettersNested classes/interfaces inherited from class gaiasky.util.gdx.shader.BaseIntShader
BaseIntShader.GlobalSetter, BaseIntShader.LocalSetter, BaseIntShader.Setter, BaseIntShader.Uniform, BaseIntShader.Validator -
Field Summary
FieldsFields inherited from class gaiasky.util.gdx.shader.DefaultIntShader
ambientCubemap, attributesMask, config, defaultCullFace, defaultDepthFunc, directionalLights, dirLightsColorOffset, dirLightsDirectionOffset, dirLightsLoc, dirLightsSize, environmentCubemap, implementedFlags, lighting, pointLights, pointLightsColorOffset, pointLightsIntensityOffset, pointLightsLoc, pointLightsPositionOffset, pointLightsSize, shadowMap, spotLights, spotLightsColorOffset, spotLightsCutoffAngleOffset, spotLightsDirectionOffset, spotLightsExponentOffset, spotLightsIntensityOffset, spotLightsLoc, spotLightsPositionOffset, spotLightsSize, u_alphaTest, u_ambientCubemap, u_ambientTexture, u_bones, u_cameraDirection, u_cameraK, u_cameraNearFar, u_cameraPosition, u_cameraUp, u_dCamPos, u_diffuseColor, u_diffuseTexture, u_dirLights0color, u_dirLights0direction, u_dirLights1color, u_emissiveColor, u_emissiveTexture, u_environmentCubemap, u_fogColor, u_heightNoiseSize, u_heightScale, u_heightSize, u_heightTexture, u_nightTexture, u_normalMatrix, u_normalTexture, u_opacity, u_pointLights0color, u_pointLights0intensity, u_pointLights0position, u_pointLights1color, u_prevProjView, u_projTrans, u_projViewTrans, u_projViewWorldTrans, u_reflectionColor, u_reflectionTexture, u_shadowMapProjViewTrans, u_shadowPCFOffset, u_shadowTexture, u_shininess, u_specularColor, u_specularTexture, u_spotLights0color, u_spotLights0cutoffAngle, u_spotLights0direction, u_spotLights0exponent, u_spotLights0intensity, u_spotLights0position, u_spotLights1color, u_tessQuality, u_time, u_viewTrans, u_viewWorldTrans, u_vrScale, u_worldTransFields inherited from class gaiasky.util.gdx.shader.BaseIntShader
camera, context, program -
Constructor Summary
ConstructorsConstructorDescriptionDepthIntShader(IntRenderable renderable)DepthIntShader(IntRenderable renderable, DepthIntShader.Config config)DepthIntShader(IntRenderable renderable, DepthIntShader.Config config, ExtShaderProgram shaderProgram)DepthIntShader(IntRenderable renderable, DepthIntShader.Config config, String prefix)DepthIntShader(IntRenderable renderable, DepthIntShader.Config config, String prefix, String vertexShader, String fragmentShader) -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.graphics.g3d.utils.RenderContext context)Initializes the context for exclusive rendering by this shader.booleancanRender(IntRenderable renderable)Checks whether this shader is intended to render theIntRenderable.static StringcreatePrefix(IntRenderable renderable, DepthIntShader.Config config)voidend()Cleanup the context so other shaders can render.static Stringstatic Stringvoidrender(IntRenderable renderable, com.badlogic.gdx.graphics.g3d.Attributes combinedAttributes)Methods inherited from class gaiasky.util.gdx.shader.DefaultIntShader
bindLights, bindMaterial, compareTo, createPrefix, dispose, equals, equals, getDefaultCullFace, getDefaultDepthFunc, init, setDefaultCullFace, setDefaultDepthFunc
-
Field Details
-
numBones
public final int numBones -
weights
public final int weights
-
-
Constructor Details
-
DepthIntShader
-
DepthIntShader
-
DepthIntShader
-
DepthIntShader
public DepthIntShader(IntRenderable renderable, DepthIntShader.Config config, String prefix, String vertexShader, String fragmentShader) -
DepthIntShader
public DepthIntShader(IntRenderable renderable, DepthIntShader.Config config, ExtShaderProgram shaderProgram)
-
-
Method Details
-
getDefaultVertexShader
-
getDefaultFragmentShader
-
createPrefix
-
begin
public void begin(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.graphics.g3d.utils.RenderContext context)Description copied from interface:IntShaderInitializes the context for exclusive rendering by this shader. Use theIntShader.render(IntRenderable)method to render aIntRenderable. When done rendering theIntShader.end()method must be called.- Specified by:
beginin interfaceIntShader- Overrides:
beginin classDefaultIntShader- Parameters:
camera- The camera to use when renderingcontext- The context to be used, which must be exclusive available for the shader until the call to theIntShader.end()method.
-
end
public void end()Description copied from interface:IntShaderCleanup the context so other shaders can render. Must be called when done rendering using theIntShader.render(IntRenderable)method, which must be preceded by a call toIntShader.begin(Camera, RenderContext). After a call to this method an call to theIntShader.render(IntRenderable)method will fail until theIntShader.begin(Camera, RenderContext)is called.- Specified by:
endin interfaceIntShader- Overrides:
endin classDefaultIntShader
-
canRender
Description copied from interface:IntShaderChecks whether this shader is intended to render theIntRenderable. Use this to make sure a call to theIntShader.render(IntRenderable)method will succeed. This is expected to be a fast, non-blocking method. Note that this method will only return true if it is intended to be used. Even when it returns false the IntShader might still be capable of rendering, but it's not preferred to do so.- Specified by:
canRenderin interfaceIntShader- Overrides:
canRenderin classDefaultIntShader- Parameters:
renderable- The renderable to check against this shader.- Returns:
- true if this shader is intended to render the
IntRenderable, false otherwise.
-
render
public void render(IntRenderable renderable, com.badlogic.gdx.graphics.g3d.Attributes combinedAttributes)- Overrides:
renderin classDefaultIntShader
-