浏览代码

added include guards to hlsl codegen

/main
vlad-andreev 8 年前
当前提交
070a44dc
共有 10 个文件被更改,包括 53 次插入7 次删除
  1. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightDefinition.cs.hlsl
  2. 12
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/ShadowDefinition.cs.hlsl
  3. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Builtin/BuiltinData.cs.hlsl
  4. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.cs.hlsl
  5. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Unlit/Unlit.cs.hlsl
  6. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPass.cs.hlsl
  7. 7
      Assets/ScriptableRenderLoop/fptl/LightDefinitions.cs.hlsl
  8. 8
      Assets/ShaderGenerator/CSharpToHLSL.cs
  9. 9
      Assets/ScriptableRenderLoop/fptl/LightingConvexHullUtils.hlsl.meta
  10. 9
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute.meta

3
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightDefinition.cs.hlsl


// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightDefinition.cs. Please don't edit by hand.
//
#ifndef LIGHTDEFINITION_CS_HLSL
#define LIGHTDEFINITION_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.LightFlags: static fields
//

}
#endif

12
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/ShadowDefinition.cs.hlsl


// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/ShadowDefinition.cs. Please don't edit by hand.
//
#ifndef SHADOWDEFINITION_CS_HLSL
#define SHADOWDEFINITION_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.ShadowType: static fields
//

{
float4x4 worldToShadow;
int shadowType;
float3 unused;
float bias;
float2 unused;
};
//

{
return value.shadowType;
}
float3 GetUnused(PunctualShadowData value)
float GetBias(PunctualShadowData value)
{
return value.bias;
}
float2 GetUnused(PunctualShadowData value)
#endif

3
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Builtin/BuiltinData.cs.hlsl


// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Builtin/BuiltinData.cs. Please don't edit by hand.
//
#ifndef BUILTINDATA_CS_HLSL
#define BUILTINDATA_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.Builtin.BuiltinData: static fields
//

};
#endif

3
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.cs.hlsl


// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.cs. Please don't edit by hand.
//
#ifndef LIT_CS_HLSL
#define LIT_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.Lit.MaterialId: static fields
//

};
#endif

3
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Unlit/Unlit.cs.hlsl


// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Unlit/Unlit.cs. Please don't edit by hand.
//
#ifndef UNLIT_CS_HLSL
#define UNLIT_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.Unlit.SurfaceData: static fields
//

};
#endif

3
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPass.cs.hlsl


// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPass.cs. Please don't edit by hand.
//
#ifndef SHADERPASS_CS_HLSL
#define SHADERPASS_CS_HLSL
//
// UnityEngine.Experimental.ScriptableRenderLoop.ShaderPass: static fields
//

#define SHADERPASS_DEBUG_VIEW_MATERIAL (7)
#endif

7
Assets/ScriptableRenderLoop/fptl/LightDefinitions.cs.hlsl


#ifndef SOMETHINGSOMETHING
#define SOMETHINGSOMETHING
#ifndef LIGHTDEFINITIONS_CS_HLSL
#define LIGHTDEFINITIONS_CS_HLSL
//
// LightDefinitions: static fields
//

}
#endif
#endif

8
Assets/ShaderGenerator/CSharpToHLSL.cs


using (var writer = File.CreateText(fileName))
{
var guard = Path.GetFileName(fileName).Replace(".", "_").ToUpper();
if (!char.IsLetter(guard[0]))
guard = "_" + guard;
writer.Write("#ifndef " + guard + "\n");
writer.Write("#define " + guard + "\n");
foreach (var gen in it.Value)
{

}
}
writer.Write("\n");
writer.Write("\n#endif\n");
}
}
}

9
Assets/ScriptableRenderLoop/fptl/LightingConvexHullUtils.hlsl.meta


fileFormatVersion: 2
guid: 97c18f9b04997a34aa7a246dbc1b2fac
timeCreated: 1477394758
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

9
Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute.meta


fileFormatVersion: 2
guid: b5507a2ffdae8a84f94211c10d428920
timeCreated: 1477394781
licenseType: Pro
ComputeShaderImporter:
currentAPIMask: 4
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存