mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
feat: lights debug mode
This commit is contained in:
parent
87dc9ed167
commit
4e5199d89a
6 changed files with 25 additions and 10 deletions
|
|
@ -118,6 +118,7 @@ void WorldRenderer::setupWorldShader(
|
|||
shader.uniform1f("u_gamma", settings.graphics.gamma.get());
|
||||
shader.uniform1f("u_fogFactor", fogFactor);
|
||||
shader.uniform1f("u_fogCurve", settings.graphics.fogCurve.get());
|
||||
shader.uniform1i("u_debugLights", lightsDebug);
|
||||
shader.uniform1f("u_weatherFogOpacity", weather.fogOpacity());
|
||||
shader.uniform1f("u_weatherFogDencity", weather.fogDencity());
|
||||
shader.uniform1f("u_weatherFogCurve", weather.fogCurve());
|
||||
|
|
@ -442,6 +443,10 @@ void WorldRenderer::setDebug(bool flag) {
|
|||
debug = flag;
|
||||
}
|
||||
|
||||
void WorldRenderer::toggleLightsDebug() {
|
||||
lightsDebug = !lightsDebug;
|
||||
}
|
||||
|
||||
Weather& WorldRenderer::getWeather() {
|
||||
return weather;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class WorldRenderer {
|
|||
|
||||
float timer = 0.0f;
|
||||
bool debug = false;
|
||||
bool lightsDebug = false;
|
||||
|
||||
/// @brief Render block selection lines
|
||||
void renderBlockSelection();
|
||||
|
|
@ -107,5 +108,7 @@ public:
|
|||
|
||||
void setDebug(bool flag);
|
||||
|
||||
void toggleLightsDebug();
|
||||
|
||||
Weather& getWeather();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ struct ChunkVertex {
|
|||
{{}, 0}};
|
||||
};
|
||||
|
||||
/// @brief Chunk mesh vertex attributes
|
||||
|
||||
template<typename VertexStructure>
|
||||
class Mesh;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue