Class TessellationShader
java.lang.Object
gaiasky.render.gdx.shader.BaseIntShader
gaiasky.render.gdx.shader.DefaultIntShader
gaiasky.render.gdx.shader.RelativisticShader
gaiasky.render.gdx.shader.GroundShader
gaiasky.render.gdx.shader.TessellationShader
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IntShader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class DefaultIntShader
DefaultIntShader.ConfigNested classes/interfaces inherited from class BaseIntShader
BaseIntShader.GlobalSetter, BaseIntShader.LocalSetter, BaseIntShader.Setter, BaseIntShader.Uniform, BaseIntShader.ValidatorModifier and TypeClassDescriptionstatic classstatic classstatic interfacestatic final recordstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intFields inherited from class GroundShader
fAlpha, fCameraHeight, fInnerRadius, fKm4PI, fKmESun, fKr4PI, fKrESun, fO3PeakHeight, fO3Width, fogColor, fogDensity, fOuterRadius, fScale, fScaleDepth, fScaleOverScaleDepth, g, nSamples, v3CameraPos, v3InvWavelength, v3LightPos, v3O3InvWavelength, v3PlanetPosModifier and TypeFieldDescriptionfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intFields inherited from class RelativisticShader
u_gw, u_gwmat3, u_hterms, u_omgw, u_ts, u_vc, u_velDirFields inherited from class DefaultIntShader
attributesMask, config, directionalLights, dirLightsColorOffset, dirLightsDirectionOffset, dirLightsLoc, dirLightsSize, lighting, pointLights, pointLightsColorOffset, pointLightsIntensityOffset, pointLightsLoc, pointLightsPositionOffset, pointLightsSize, shadowMap, u_alphaTest, u_ambientCubemap, u_aoCubemap, u_aoTexture, u_bodySize, u_bones, u_cameraDirection, u_cameraK, u_cameraNearFar, u_cameraPos, u_cameraPosition, u_cameraUp, u_csmClip, u_csmPCF, u_csmSamplers, u_csmTransforms, u_diffuseColor, u_diffuseCubemap, u_diffuseScatteringColor, u_diffuseTexture, u_dirLights0color, u_dirLights0direction, u_dirLights1color, u_eclipseOutlines, u_eclipsingBodyPos, u_eclipsingBodyRadius, u_elevationMultiplier, u_emissiveColor, u_emissiveCubemap, u_emissiveTexture, u_fogColor, u_generic1, u_generic2, u_heightCubemap, u_heightNoiseSize, u_heightScale, u_heightSize, u_heightTexture, u_ior, u_iridescenceFactor, u_iridescenceIOR, u_iridescenceTexture, u_iridescenceThicknessMax, u_iridescenceThicknessMin, u_iridescenceThicknessTexture, u_kmToU, u_metallicColor, u_metallicCubemap, u_metallicTexture, u_normalCubemap, u_normalMatrix, u_normalTexture, u_occlusionMetallicRoughnessTexture, u_opacity, u_pointLights0color, u_pointLights0intensity, u_pointLights0position, u_pointLights1color, u_projTrans, u_projViewTrans, u_reflectionCubemap, u_roughnessColor, u_roughnessCubemap, u_roughnessTexture, u_shadowMapProjViewTrans, u_shadowMapProjViewTransGlobal, u_shadowPCFOffset, u_shadowTexture, u_shadowTextureGlobal, u_shininess, u_simuTime, u_specularColor, u_specularCubemap, u_specularTexture, u_svtBufferTexture, u_svtDepth, u_svtDetectionFactor, u_svtId, u_svtIndirectionAoTexture, u_svtIndirectionDiffuseTexture, u_svtIndirectionEmissiveTexture, u_svtIndirectionHeightTexture, u_svtIndirectionMetallicTexture, u_svtIndirectionNormalTexture, u_svtIndirectionRoughnessTexture, u_svtIndirectionSpecularTexture, u_svtResolution, u_svtTileSize, u_tessQuality, u_texture0, u_texture1, u_thicknessFactor, u_thicknessTexture, u_time, u_volume0, u_volume0BoundsMax, u_volume0BoundsMin, u_volume1, u_volume1BoundsMax, u_volume1BoundsMin, u_volume2, u_volume2BoundsMax, u_volume2BoundsMin, u_volume3, u_volume3BoundsMax, u_volume3BoundsMin, u_volumeColor, u_volumeDistance, u_vrOffset, u_vrScale, u_worldTransModifier and TypeFieldDescriptionprotected final Bitsprotected final DefaultIntShader.Configprotected final com.badlogic.gdx.graphics.g3d.environment.DirectionalLight[]protected intprotected intprotected intprotected intprotected final booleanprotected final com.badlogic.gdx.graphics.g3d.environment.PointLight[]protected intprotected intprotected intprotected intprotected intprotected final booleanfinal intprotected final intprotected final intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intint[]intint[]int[]final intprotected final intfinal intfinal intprotected final intprotected final intprotected final intfinal intfinal intfinal intfinal intfinal intprotected final intfinal intprotected final intprotected final intprotected final intprotected final intfinal intfinal intfinal intfinal intintintintintintintintprotected final intfinal intprotected final intfinal intprotected final intfinal intfinal intfinal intfinal intprotected final intprotected final intprotected final intprotected final intfinal intfinal intprotected final intfinal intprotected final intfinal intprotected final intprotected final intprotected final intprotected final intprotected final intfinal intfinal intfinal intprotected final intfinal intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intprotected final intfinal intprotected final intprotected final intintintfinal intprotected final intintintprotected final intintintprotected final intintintprotected final intintintintintfinal intfinal intfinal intFields inherited from class BaseIntShader
camera, context, programModifier and TypeFieldDescriptioncom.badlogic.gdx.graphics.Cameracom.badlogic.gdx.graphics.g3d.utils.RenderContext -
Constructor Summary
ConstructorsConstructorDescriptionTessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config) TessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config, TessellationShaderProgram shaderProgram) TessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config, String prefix) TessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config, String prefix, String vertexShader, String controlShader, String evaluationShader, String fragmentShader) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRender(IntRenderable renderable) Checks whether this shader is intended to render theIntRenderable.static StringcreatePrefix(IntRenderable renderable, TessellationShaderProvider.Config config) voidrenderMesh(ExtShaderProgram program, IntMeshPart meshPart) If necessary, override.Methods inherited from class GroundShader
createPrefixModifier and TypeMethodDescriptionstatic StringcreatePrefix(IntRenderable renderable, DefaultIntShader.Config config) Methods inherited from class DefaultIntShader
begin, bindLights, bindMaterial, compareTo, dispose, end, equals, equals, getDefaultCullFace, getDefaultDepthFunc, getDefaultFragmentShader, getDefaultVertexShader, init, render, setDefaultCullFace, setDefaultDepthFuncModifier 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.protected voidbindLights(IntRenderable renderable, Attributes attributes) protected voidbindMaterial(Attributes attributes) intCompare this shader against the other, used for sorting, light weight shaders are rendered first.voiddispose()voidend()Cleanup the context so other shaders can render.booleanequals(DefaultIntShader obj) booleanintintstatic Stringstatic Stringvoidinit()Initializes the IntShader, must be called before the IntShader can be used.voidrender(IntRenderable renderable, Attributes combinedAttributes) voidsetDefaultCullFace(int cullFace) voidsetDefaultDepthFunc(int depthFunc) Methods inherited from class BaseIntShader
getUniformAlias, getUniformID, has, init, loc, register, register, register, register, register, register, render, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setModifier and TypeMethodDescriptiongetUniformAlias(int id) intgetUniformID(String alias) final booleanhas(int inputID) Whether this IntShader instance implements the specified uniform, only valid after a call to init().voidinit(ExtShaderProgram program, IntRenderable renderable) Initialize this shader, causing all registered uniforms/attributes to be fetched.final intloc(int inputID) intregister(BaseIntShader.Uniform uniform) intregister(BaseIntShader.Uniform uniform, BaseIntShader.Setter setter) intintregister(String alias, BaseIntShader.Setter setter) intregister(String alias, BaseIntShader.Validator validator) intregister(String alias, BaseIntShader.Validator validator, BaseIntShader.Setter setter) Register an uniform which might be used by this shader.voidrender(IntRenderable renderable) Renders theIntRenderable, must be called betweenIntShader.begin(Camera, RenderContext)andIntShader.end().final booleanset(int uniform, float value) final booleanset(int uniform, float v1, float v2) final booleanset(int uniform, float v1, float v2, float v3) final booleanset(int uniform, float v1, float v2, float v3, float v4) final booleanset(int uniform, int value) final booleanset(int uniform, int v1, int v2) final booleanset(int uniform, int v1, int v2, int v3) final booleanset(int uniform, int v1, int v2, int v3, int v4) final booleanset(int uniform, com.badlogic.gdx.graphics.Color value) final booleanset(int uniform, com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor textureDesc) final booleanset(int uniform, com.badlogic.gdx.graphics.GLTexture texture) final booleanset(int uniform, com.badlogic.gdx.math.Matrix3 value) final booleanset(int uniform, com.badlogic.gdx.math.Matrix4 value) final booleanset(int uniform, com.badlogic.gdx.math.Vector2 value) final booleanset(int uniform, com.badlogic.gdx.math.Vector3 value)
-
Field Details
-
u_noiseType
public final int u_noiseType -
u_elevationSeed
public final int u_elevationSeed -
u_elevationPersistence
public final int u_elevationPersistence -
u_elevationFrequency
public final int u_elevationFrequency -
u_elevationLacunarity
public final int u_elevationLacunarity -
u_elevationScale
public final int u_elevationScale -
u_elevationOctaves
public final int u_elevationOctaves -
u_elevationTurbulence
public final int u_elevationTurbulence -
u_elevationRidge
public final int u_elevationRidge -
u_moistureSeed
public final int u_moistureSeed -
u_moisturePersistence
public final int u_moisturePersistence -
u_moistureFrequency
public final int u_moistureFrequency -
u_moistureLacunarity
public final int u_moistureLacunarity -
u_moistureScale
public final int u_moistureScale -
u_moistureOctaves
public final int u_moistureOctaves -
u_moistureTurbulence
public final int u_moistureTurbulence -
u_moistureRidge
public final int u_moistureRidge -
u_baseLevel
public final int u_baseLevel
-
-
Constructor Details
-
TessellationShader
public TessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config, String prefix, String vertexShader, String controlShader, String evaluationShader, String fragmentShader) -
TessellationShader
public TessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config, TessellationShaderProgram shaderProgram) -
TessellationShader
-
TessellationShader
public TessellationShader(IntRenderable renderable, TessellationShaderProvider.Config config, String prefix)
-
-
Method Details
-
createPrefix
public static String createPrefix(IntRenderable renderable, TessellationShaderProvider.Config config) -
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 classGroundShader- Parameters:
renderable- The renderable to check against this shader.- Returns:
- true if this shader is intended to render the
IntRenderable, false otherwise.
-
renderMesh
Description copied from class:BaseIntShaderIf necessary, override.- Overrides:
renderMeshin classBaseIntShader- Parameters:
program- The shader program.meshPart- The mesh part.
-