From: Terri00 Date: Thu, 7 Mar 2019 20:18:38 +0000 (+0000) Subject: Gamma corrected height shader (thanks Yanzl) X-Git-Url: https://skaterift.com/git/?a=commitdiff_plain;h=cd74bd234f407f1517f475d05ba8211eb59b0958;p=tar-legacy.git Gamma corrected height shader (thanks Yanzl) --- diff --git a/MCDV/depth.fs b/MCDV/depth.fs index 9171f63..24fc069 100644 --- a/MCDV/depth.fs +++ b/MCDV/depth.fs @@ -14,7 +14,6 @@ in float Alpha; void main() { - float height = (Depth - HEIGHT_MIN) / HEIGHT_MAX; - - FragColor = vec4(height, height, height, 1.0); + float height = pow((Depth - HEIGHT_MIN) / HEIGHT_MAX, 2.2); + FragColor = vec4(height, height, height, Alpha); } \ No newline at end of file diff --git a/MCDV/vbsp.hpp b/MCDV/vbsp.hpp index 0f2608b..020ff40 100644 --- a/MCDV/vbsp.hpp +++ b/MCDV/vbsp.hpp @@ -543,6 +543,8 @@ public: if (face.dispInfo == -1 || true) { + std::cout << " ~ " << this->texDataString[this->texinfos[face.texInfo].texdata] << std::endl; + std::vector vertices; for (int e = face.firstEdge; e < face.firstEdge + face.numEdges; e++) { //edge_indexes.push_back);