Package gaiasky.util.gdx.shader
Class GroundShader
- java.lang.Object
-
- gaiasky.util.gdx.shader.BaseIntShader
-
- gaiasky.util.gdx.shader.DefaultIntShader
-
- gaiasky.util.gdx.shader.RelativisticShader
-
- gaiasky.util.gdx.shader.GroundShader
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IntShader
- Direct Known Subclasses:
TessellationShader
public class GroundShader extends RelativisticShader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroundShader.Inputs
static class
GroundShader.Setters
-
Nested classes/interfaces inherited from class gaiasky.util.gdx.shader.DefaultIntShader
DefaultIntShader.Config
-
Nested classes/interfaces inherited from class gaiasky.util.gdx.shader.BaseIntShader
BaseIntShader.GlobalSetter, BaseIntShader.LocalSetter, BaseIntShader.Setter, BaseIntShader.Uniform, BaseIntShader.Validator
-
-
Field Summary
Fields Modifier and Type Field Description int
fAlpha
int
fCameraHeight
int
fCameraHeight2
int
fInnerRadius
int
fInnerRadius2
int
fKm4PI
int
fKmESun
int
fKr4PI
int
fKrESun
int
fogColor
int
fogDensity
int
fOuterRadius
int
fOuterRadius2
int
fSamples
int
fScale
int
fScaleDepth
int
fScaleOverScaleDepth
int
g
int
g2
int
nSamples
int
v3CameraPos
int
v3InvWavelength
int
v3LightPos
int
v3PlanetPos
-
Fields inherited from class gaiasky.util.gdx.shader.RelativisticShader
u_gw, u_gwmat3, u_hterms, u_omgw, u_ts, u_vc, u_velDir
-
Fields 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_worldTrans
-
Fields inherited from class gaiasky.util.gdx.shader.BaseIntShader
camera, context, program
-
-
Constructor Summary
Constructors Constructor Description GroundShader(IntRenderable renderable)
GroundShader(IntRenderable renderable, DefaultIntShader.Config config)
GroundShader(IntRenderable renderable, DefaultIntShader.Config config, ExtShaderProgram shaderProgram)
GroundShader(IntRenderable renderable, DefaultIntShader.Config config, java.lang.String prefix)
GroundShader(IntRenderable renderable, DefaultIntShader.Config config, java.lang.String prefix, java.lang.String vertexShader, java.lang.String fragmentShader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRender(IntRenderable renderable)
Checks whether this shader is intended to render theIntRenderable
.static java.lang.String
createPrefix(IntRenderable renderable, DefaultIntShader.Config config)
-
Methods inherited from class gaiasky.util.gdx.shader.DefaultIntShader
begin, bindLights, bindMaterial, compareTo, dispose, end, equals, equals, getDefaultCullFace, getDefaultDepthFunc, getDefaultFragmentShader, getDefaultVertexShader, init, render, setDefaultCullFace, setDefaultDepthFunc
-
-
-
-
Field Detail
-
fAlpha
public final int fAlpha
-
fCameraHeight
public final int fCameraHeight
-
fCameraHeight2
public final int fCameraHeight2
-
fOuterRadius
public final int fOuterRadius
-
fOuterRadius2
public final int fOuterRadius2
-
fInnerRadius
public final int fInnerRadius
-
fInnerRadius2
public final int fInnerRadius2
-
fKrESun
public final int fKrESun
-
fKmESun
public final int fKmESun
-
fKr4PI
public final int fKr4PI
-
fKm4PI
public final int fKm4PI
-
fScale
public final int fScale
-
fScaleDepth
public final int fScaleDepth
-
fScaleOverScaleDepth
public final int fScaleOverScaleDepth
-
nSamples
public final int nSamples
-
fSamples
public final int fSamples
-
fogDensity
public final int fogDensity
-
fogColor
public final int fogColor
-
g
public final int g
-
g2
public final int g2
-
v3PlanetPos
public final int v3PlanetPos
-
v3LightPos
public final int v3LightPos
-
v3CameraPos
public final int v3CameraPos
-
v3InvWavelength
public final int v3InvWavelength
-
-
Constructor Detail
-
GroundShader
public GroundShader(IntRenderable renderable)
-
GroundShader
public GroundShader(IntRenderable renderable, DefaultIntShader.Config config)
-
GroundShader
public GroundShader(IntRenderable renderable, DefaultIntShader.Config config, java.lang.String prefix)
-
GroundShader
public GroundShader(IntRenderable renderable, DefaultIntShader.Config config, java.lang.String prefix, java.lang.String vertexShader, java.lang.String fragmentShader)
-
GroundShader
public GroundShader(IntRenderable renderable, DefaultIntShader.Config config, ExtShaderProgram shaderProgram)
-
-
Method Detail
-
canRender
public boolean canRender(IntRenderable renderable)
Description copied from interface:IntShader
Checks 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:
canRender
in interfaceIntShader
- Overrides:
canRender
in classDefaultIntShader
- Parameters:
renderable
- The renderable to check against this shader.- Returns:
- true if this shader is intended to render the
IntRenderable
, false otherwise.
-
createPrefix
public static java.lang.String createPrefix(IntRenderable renderable, DefaultIntShader.Config config)
-
-