Skip to content

Recommend changing variable name "smooth" to something else in the Landscape shader #4

@lynnhu

Description

@lynnhu

When I select the landscape shader example from dropdown Processing 4 would freeze and throw an error :

RuntimeException: Cannot compile fragment shader:
ERROR: 0:113: 'smooth' : syntax error: syntax error

Turned out the function on line 111 in landscape.glsl is setting the variable name as "smooth" which seems to be recognized as a qualifier in GLSL:
vec3 smoothmix(vec3 a, vec3 b, float base, float smooth, float source)

Changed the name to something else like smoothValue and it runs now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions