Zylann / godot_heightmap_plugin

HeightMap terrain for Godot implemented in GDScript
Other
1.74k stars 159 forks source link

Classic4 shader doesn't render terrain on mac os #92

Open Luthien-in-edhil opened 5 years ago

Luthien-in-edhil commented 5 years ago

I'm having the same issue as ardawan reported here: terrain remains pitch black using the default Classic4 shader under Mac OS. The Classic4Lite shader works, therefore I can see that light, material etc. are set up as documented.

Using current master branch (v 1.0.2) of the Godot Heightmap Plugin + Godot 3.1 running mac os Mojava (10.14.5).

Zylann commented 5 years ago

Did you assign a normal map to your textures? There is a usability issue with this shader at the moment because if you don't setup a normal map, it defaults to whatever the OpenGL driver decides to be the default color, which might be black. The Lite shader doesn't use normal maps so that's why it may look fine by default.

EnergoKissel commented 4 years ago

Same issue with Classic4 shader on Mac Os Catalina 10.15.3, using Godot 3.2, current master branch (v 1.1.1) of the Godot Heightmap Plugin Normal maps assigned, Classic4Lite shader works

cptnron commented 4 years ago

It does look like a problem loading one of the normal textures into the shader. If you comment line 154 in the Classic4 shader and replace it with any vec4, such as vec4 nr2 = vec4(1.0); it works. I can't figure out why it won't load that one texture though. (I tried replacing the textures and that didn't change it, so I am pretty sure it is related to that slot, and not the texture itself).

Zylann commented 4 years ago

Classic4 is known to expect a normal map in ground textures, but if none are assigned in the renderer that shader won't work (and by default, none are assigned). I should either make Classic4Lite default or fill the textures with a default normal+roughness texture. Although, it's not supposed to completely hide the terrain.

TokisanGames commented 4 years ago

OSX produces black textures in editor and in exports

Environment Godot 3.2.1 stock OSX 10.14.6 mojave GLES3 Radeon Pro 555X 4GB 9c31aa68cd4c1674e1e600461e6712df9005d6a2 My modified Classic4 shader from #10.

Screenshots image

All 4 texture channels have all 4 maps filled. Normal, rough, albedo, height. This scene has all 4 textures on screen and they're all black. If the shader wasn't working it should be white.

Zylann commented 4 years ago

==> Godot I can't investigate this, I don't have a Mac. Looking at the card specs https://www.techpowerup.com/gpu-specs/radeon-pro-555x.c3283, it looks like it should run that shader fine.

TokisanGames commented 4 years ago

Correction: Classic4Lite displays the global_albedo map in the editor. However saving the scene and running it shows black.