Displacement stubs for material preview

This commit is contained in:
Lubos Lenco
2021-04-17 19:24:52 +02:00
parent 5141d8d11a
commit 5d47ce40ab
+10
View File
@@ -84,6 +84,16 @@ class MakeMeshPreview {
frag.write('vec3 nortan = $nortan;');
frag.write('float height = $height;');
// MaterialParser.parse_height_as_channel = false;
// vert.write('float vheight = $height;');
// vert.add_out('float height');
// vert.write('height = vheight;');
// var displaceStrength = 0.1;
// if (MakeMaterial.heightUsed && displaceStrength > 0.0) {
// vert.write('vec3 pos2 = $pos.xyz + vec3(nor.xy, pos.w) * vec3($height, $height, $height) * vec3($displaceStrength, $displaceStrength, $displaceStrength);');
// vert.write('gl_Position = mul(vec4(pos2.xyz, 1.0), WVP);');
// }
if (decal) {
if (Context.tool == ToolText) {
frag.add_uniform('sampler2D textexttool', '_textexttool');