[General]
language=GLSLKGVER
compiler=GLSLANGKGVER
entryPoint=VS_Forward
shaderType=Vertex
shaderModel=450
outputType=SPIR-V
encoding=UTF-8
includePaths=E:/git-code1/Source/KG3DEngine/KG3DEngineOpenGL/KEngine/virtualgeometry/shaders, E:/sword3-products/trunk/client/data/material/shader_mb
macros=@Invalid()
lastHLSLCompiler=GLSLANGKGVER
lastGLSLCompiler=GLSLANGKGVER
lastOpenDir=E:/git-code/Source/KG3DEngine/KG3DEngineOpenGL/KEngine/virtualgeometry/shaders
inputContent="[SHARED]\n#define MATERIAL_SYS_DECLARED\n#define VG_MULTI_VIEW 1\n#define VG_PIXEL_PROGRAMMABLE 1\n//#define VG_HAS_SPEEDTREE 1\n//#define VG_SPEEDTREE_GEOMETRY_TYPE 0\n//#define RASTER_TECHNIQUE 2\n//#define VG_VERTEX_PROGRAMMABLE 1\n\n#define PIXEL_VALUE (RASTER_TECHNIQUE != RASTER_TECHNIQUE_DEPTHONLY || VG_PIXEL_PROGRAMMABLE)\n\n#include \"public.glsl [USERSHADER]\"\n\n[VS_Forward]\n#include \"self [SHARED]\"\n\n#include \"vg_math_common.glsli [BASE_FUNC_INCLUDE]\"\n#include \"vg_definitions.glsli [SHARED]\"\n#include \"vg_bit_packing.glsli [BIT_FIELD_UTILS]\"\n#include \"vg_bit_packing.glsli [UNPACK_UTILS]\"\n#include \"vg_bit_packing.glsli [BIT_STREAM_READER]\"\n#include \"vg_buffer_utils.glsli [SHARED]\"\n#include \"vg_common.glsli [SHARED]\"\n#include \"vg_common.glsli [UBO_COMMON_INCLUDE]\"\n#include \"vg_common.glsli [UBO_PASS_INCLUDE]\"\n#include \"vg_data_decode.glsli [PAGE_DATA_INCLUDE]\"\n#include \"vg_data_decode.glsli [CLUSTER_INCLUDE]\"\n#include \"vg_scene_data.glsli [SCENE_CLUSTER_PAGE_DATA_INCLUDE]\"\n#include \"vg_scene_data.glsli [SCENE_INSTANCE_INCLUDE]\"\n#include \"vg_attribute_decode.glsli [SHARED]\"\n\n#include \"vg_scene_data.glsli [GPU_VIEW_INCLUDE]\"\n#include \"vg_scene_data.glsli [VISIBLE_CLUSTER_INCLUDE]\"\n#include \"vg_scene_data.glsli [SCENE_VISIBLE_CLUSTER_INCLUDE]\"\n\n#include \"materialtemplate.glsl [VS]\"\n#include \"vg_math_common.glsli [OTHERS_FUNC_INCLUDE]\"\n\n#include \"vg_renderdirectfactory.glsli [VF_COMMON]\"\n#include \"vg_renderdirectfactory.glsli [VF_VERTEX_TYPE]\"\n#include \"vg_renderdirectfactory.glsli [VF_OUTPUT_TYPE]\"\n#include \"vg_renderdirectfactory.glsli [VF_MAIN]\"\n\nvoid main()\n{\n\tVSOut_MTLSYS outputVertex = VertexFactory_Main(gl_VertexIndex, gl_InstanceID);\n\tMtlSysOutputVertexData(outputVertex);\n\n\tgl_Position = outputVertex.Position;\n}\n\n[PS_Common]\n#include \"public.glsl [FS]\"\n#include \"pub.glsl [global_uniform_mat]\"\n\n#include \"commonparams.glsl [FS]\"\n#include \"commonparams.glsl [MESHSHADER_SPECIALIZATION_CONST]\"\n#include \"materialtemplate.glsl [FS]\"\n#include \"self [SHARED]\"\n\n#include \"light.glsl [FS]\"\n#include \"pub.glsl [global_uniform_light]\"\n\n#include \"vg_math_common.glsli [BASE_FUNC_INCLUDE]\"\n#include \"vg_definitions.glsli [SHARED]\"\n#include \"vg_bit_packing.glsli [BIT_FIELD_UTILS]\"\n#include \"vg_bit_packing.glsli [UNPACK_UTILS]\"\n#include \"vg_bit_packing.glsli [BIT_STREAM_READER]\"\n#include \"vg_buffer_utils.glsli [SHARED]\"\n#include \"vg_common.glsli [SHARED]\"\n#include \"vg_common.glsli [UBO_COMMON_INCLUDE]\"\n#include \"vg_data_decode.glsli [PAGE_DATA_INCLUDE]\"\n#include \"vg_data_decode.glsli [CLUSTER_INCLUDE]\"\n#include \"vg_scene_data.glsli [SCENE_INSTANCE_INCLUDE]\"\n\n#include \"vg_scene_data.glsli [GPU_VIEW_INCLUDE]\"\n#include \"vg_scene_data.glsli [VISIBLE_CLUSTER_INCLUDE]\"\n#include \"vg_scene_data.glsli [SCENE_VISIBLE_CLUSTER_INCLUDE]\"\n#include \"vg_scene_data.glsli [SCENE_CLUSTER_PAGE_DATA_INCLUDE]\"\n#include \"vg_scene_data.glsli [INSTANCE_DYNAMIC_DATA_INCLUDE]\"\n\n#include \"vg_renderdirectfactory.glsli [VF_VERTEX_TYPE]\"\n#include \"vg_renderdirectfactory.glsli [VF_INPUT_TYPE]\"\n#include \"vg_renderdirectpixelbase.glsli [SHARED]\"\n\n#include \"vg_math_common.glsli [OTHERS_FUNC_INCLUDE]\"\n\nvoid CalculateMainPixelNode(in MaterialPixelParameters Parameters, inout ParamsMainPixelNode MainNodeParam, VG_DATA VGData)\n{\n    MainNodeParam.Albedo = Parameters.VertexColor.xyz;\n    MainNodeParam.Normal = Parameters.WorldNormal;\n    MainNodeParam.Roughness = 1.0f;\n}\n\n[PS_Forward]\n#include \"self [PS_Common]\"\n\nlayout(location = 0) out mediump vec4 fragColor;\nlayout(location = 1) out lowp vec4 fragNormal;\n\nvoid PS_ForwardColor(in VSOut_MTLSYS In, bool IsFrontFace)\n{\n    uvec2 PixelPos = uvec2(In.Position.xy);\n    IsFrontFace = !IsFrontFace; // VG vertex circle is invert.\n\n//#if VG_MULTI_VIEW\n//    if (!all(And(greaterThanEqual(ivec2(PixelPos), In.ViewRect.xy), lessThan(ivec2(PixelPos), In.ViewRect.zw))))\n//\t{\n//    \tdiscard;\n//\t}\n//#endif\n\n    uint PixelValue = In.PixelValue;\n    uint VisibleClusterIndex = (PixelValue >> 7) - 1;\n    uint TriIndex = PixelValue & 0x7F;\n\n\tVG_DATA VGData = Init_VG_DATA();\n\n    MaterialPixelParameters Params = GetMaterialPixelParameters(In.Position, VisibleClusterIndex, In, VGData);\n    //Params.IsFrontFace = IsFrontFace;\n    \n    ParamsMainPixelNode PixelMainNode;\n    ClearParamsMainPixelNode(PixelMainNode);\n        \n    CalculateMainPixelNode(Params, PixelMainNode, VGData);\n\n    fragColor = vec4(PixelMainNode.Albedo, 1.0f);\n    fragNormal = vec4(PixelMainNode.Normal * 0.5 + 0.5, PixelMainNode.Roughness);\n\n//#ifdef ALPHATEST\n//#if ((SHADER_FLAG & Shader_Flag_bDisableAlphaTest_Bit) == 0)\t\n//\tif(PixelMainNode.Opacity < alpharef.x) \n//\t{\n//\t\tdiscard;\n//\t}\n//#endif\t\n//#endif\t\n//\n//\tfragColor = vec4(PixelMainNode.Emissive, PixelMainNode.Opacity * vModelColor.a);\n//#if ((SHADER_FLAG & Shader_Flag_bSimplifyPBR_Bit) == 0)\n//\tSurfaceInput Surface = FragmentSetup(PixelMainNode, Params.ViewDir);\t\n//\tfragColor.rgb += ComputePBR(Surface, Params.WorldPosition, Params.ScreenPosition);\t\n//\tfragNormal = EncodeNormalAlbedo(Surface);\n//#else\n//\tfragColor = DebugPixelMainNode(PixelMainNode);\n//\tfragNormal = vec4(0.0);\t\n//#endif\n}\n\nvoid main()\n{\n\tVSOut_MTLSYS In = MtlSyInputVertexData();\n\tPS_ForwardColor(In , gl_FrontFacing);\n}\n\n@@Color\n@vs = VS_Forward\n@fs = PS_Forward\n"
includePathsVisible=true
macrosVisible=false
extraOptionsEnabled=false
extraOptions=
filePath=
