gongpha / gdQmapbsp

A simple plugin that loads Quake's MAP/BSP files into Godot 4 interactively
MIT License
42 stars 5 forks source link

Add support for bright & animated textures #21

Closed gongpha closed 11 months ago

gongpha commented 11 months ago

https://github.com/gongpha/gdQmapbsp/assets/13400398/8c47f707-fd45-4f5f-86e5-5da472024403

victorbstan commented 11 months ago

Very nice, maybe something to consider either for this PR or a future one; if it's possible to move the uniform sampler # (96) to gdscript (CPU memory) instead of GPU shader, and keep the shader to 1 sample?

gongpha commented 11 months ago

I will surely change the shader from one material for all textures to one material per texture to make it easier to customize individual texture drawings. But I'll probably have to factor in the code to keep updating the uniforms for every shader on the map like lightstyles or animated textures. Maybe using the global uniforms, a new feature in 4.0, might also be a good option.

gongpha commented 11 months ago

Using the alternate textures on certain entities doesn't work yet (activated textures on func_button). I will add them after refactoring the surface shader.