浏览代码

Fixed issue where lightprobes were not rendering.

/Branch_batcher
Felipe Lira 8 年前
当前提交
ae4bcfc3
共有 3 个文件被更改,包括 11 次插入3 次删除
  1. 4
      Assets/LowEndMobilePipeline/Editor/LowendPipelineAssetInspector.cs
  2. 5
      Assets/LowEndMobilePipeline/LowEndMobilePipeline.cs
  3. 5
      Assets/LowEndMobilePipeline/Shaders/LowEndMobilePipeline.shader

4
Assets/LowEndMobilePipeline/Editor/LowendPipelineAssetInspector.cs


public static GUIContent enableLightmap = new GUIContent("Enable Lightmap",
"Only non-directional lightmaps are supported");
public static GUIContent enableAmbientProbe = new GUIContent("Enable Ambient Probe",
"Uses light probes as ambient light source for non-lightmapped objects.");
public static GUIContent enableAmbientProbe = new GUIContent("Enable Light Probes",
"Enables/Disabled light probe support.");
public static GUIContent shadowType = new GUIContent("Shadow Type",
"Single directional shadow supported. SOFT_SHADOWS applies shadow filtering.");

5
Assets/LowEndMobilePipeline/LowEndMobilePipeline.cs


keywordIndex += 2;
cmd.EnableShaderKeyword(shadowKeywords[keywordIndex]);
}
if (m_Asset.EnableAmbientProbe)
cmd.EnableShaderKeyword("_LIGHT_PROBES_ON");
else
cmd.DisableShaderKeyword("_LIGHT_PROBES_ON");
}
// Finds main light and main shadow casters and places them in the beginning of array.

5
Assets/LowEndMobilePipeline/Shaders/LowEndMobilePipeline.shader


#pragma shader_feature _CUBEMAP_REFLECTION
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile _ _LIGHT_PROBES_ON
#pragma multi_compile _ _HARD_SHADOWS _SOFT_SHADOWS _HARD_SHADOWS_CASCADES _SOFT_SHADOWS_CASCADES
#pragma multi_compile _ _VERTEX_LIGHTS
#pragma multi_compile_fog

o.shadowCoord = mul(_WorldToShadow[0], float4(o.posWS, 1.0));
#endif
#ifdef _LIGHT_PROBES_ON
#endif
UNITY_TRANSFER_FOG(o, o.hpos);
return o;

#if defined(LIGHTMAP_ON)
color += (DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uv01.zw)) + i.fogCoord.yzw) * diffuse;
#elif defined(_VERTEX_LIGHTS) || defined(_VERTEX_AND_PIXEL_LIGHTS)
#elif defined(_VERTEX_LIGHTS) || defined(_LIGHT_PROBES_ON)
color += i.fogCoord.yzw * diffuse;
#endif

正在加载...
取消
保存