This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

Terrain Shader with parallax and height base blending

KinwailoKinwailo Posts: 1Member

I have written a terrain shader for godot. This shader use heightmap base to blending different splat texture, giving you a much more natural look. It also use parallax mapping that look more depth to the terrain texture.

more info:
https://kinwailo.wordpress.com/2017/05/19/godot-terrain-shader/

Comments

  • MagicLordMagicLord Posts: 578Unconfirmed

    @Kinwailo said:
    I have written a terrain shader for godot. This shader use heightmap base to blending different splat texture, giving you a much more natural look. It also use parallax mapping that look more depth to the terrain texture.

    more info:
    https://kinwailo.wordpress.com/2017/05/19/godot-terrain-shader/

    Does it work with Godot 3 rc2 ?

  • MegalomaniakMegalomaniak Posts: 2,580Admin
    edited January 2018

    Would likely need to be converted. I don't think it would be a difficult job. In fact if you want to learn to understand the shader system better porting this would be an excellent practice project for you. Note that I'm talking of the shader only.

  • MagicLordMagicLord Posts: 578Unconfirmed

    @Megalomaniak said:
    Would likely need to be converted. I don't think it would be a difficult job. In fact if you want to learn to understand the shader system better porting this would be an excellent practice project for you. Note that I'm talking of the shader only.

    Yeah, i'll use that code example to make my own shader version without parallax.

  • TrinketosTrinketos Posts: 14Member

    I have a error in godot 3 whit the shader
    error(101): Invalid member for mat4 expression .x

  • MegalomaniakMegalomaniak Posts: 2,580Admin

    http://docs.godotengine.org/en/latest/tutorials/shading/shading_language.html#swizzling

    It is possible to obtain any combination of them in any order, as long as the result is another vector type (or scalar).

    Also, as I said above, likely needs conversion. Shader language got refactored substantially and broke compatibility, so you can't just expect shaders for godot 2.x or previous to work as is in 3.0.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.