Gamma corrected height shader (thanks Yanzl)
authorTerri00 <thrustmediaproductions@gmail.com>
Thu, 7 Mar 2019 20:18:38 +0000 (20:18 +0000)
committerTerri00 <thrustmediaproductions@gmail.com>
Thu, 7 Mar 2019 20:18:38 +0000 (20:18 +0000)
MCDV/depth.fs
MCDV/vbsp.hpp

index 9171f63e298946953d68d44383294005dcd3408c..24fc06936b8d7882540d323dfcc5c37eb84b1d37 100644 (file)
@@ -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
index 0f2608bf5d2da8b0fd3ddd614f5dcc765ab289b6..020ff406a2a4dbbb3ef8f54cebf299ccfedf863b 100644 (file)
@@ -543,6 +543,8 @@ public:
 
                        if (face.dispInfo == -1 || true)
                        {
+                               std::cout << " ~ " << this->texDataString[this->texinfos[face.texInfo].texdata] << std::endl;
+
                                std::vector<bsp::vertex> vertices;
                                for (int e = face.firstEdge; e < face.firstEdge + face.numEdges; e++) {
                                        //edge_indexes.push_back);