Skip to content

GLSL ES 300 #4

@mattdesl

Description

@mattdesl

Changes at a glance:
http://www.shaderific.com/blog/2014/3/13/tutorial-how-to-update-a-shader-for-opengl-es-30

  • #version 300 es appears at top
  • texture2D -> texture
  • attribute -> in
  • gl_FragCoord - custom out
  • varying -> in / out
  • some more constants:
    • gl_VertexID, gl_InstanceID, 'gl_MaxVertexAttribs', 'gl_MaxVertexUniformVectors', 'gl_MaxVertexOutputVectors', 'gl_MaxFragmentInputVectors', 'gl_MaxVertexTextureImageUnits', 'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits', 'gl_MaxFragmentUniformVectors', 'gl_MaxDrawBuffers', 'gl_MinProgramTexelOffset', 'gl_MaxProgramTexelOffset',
  • new functions like textureSize, inversesqrt, transpose, inverse, textureProj
  • new literals like sampler2DArray

Reference:
https://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.3.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions