public static unsafe void EncodeLitMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, ref LitMaterialBGFX mat, ref LightingBGFX lighting, ref float4x4 viewTx, int startIndex, int indexCount, byte flipCulling, ref LightingViewSpaceBGFX viewSpaceLightCache, uint depth) { mesh.SetForSubmit(encoder, startIndex, indexCount); EncodeLit(sys, encoder, ref sys->m_litShader, viewId, ref tx, ref mat, ref lighting, ref viewTx, flipCulling, ref viewSpaceLightCache, depth); }
public static unsafe void EncodeSimpleSkinnedmesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, ref SimpleMaterialBGFX mat, int startIndex, int indexCount, byte flipCulling, uint depth, float4x4[] boneMatrices) { mesh.SetForSubmit(encoder, startIndex, indexCount); fixed(float4x4 *p = boneMatrices) { bgfx.encoder_set_uniform(encoder, sys->m_simpleSkinnedMeshShader.m_uniformBoneMatrices, p, (ushort)boneMatrices.Length); } EncodeSimple(sys, encoder, ref sys->m_simpleSkinnedMeshShader.m_simpleShader, viewId, ref tx, ref mat, flipCulling, depth); }
public static unsafe void EncodeShadowMapSkinnedMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, int startIndex, int indexCount, byte flipCulling, float4 bias, float4x4[] boneMatrices) { mesh.SetForSubmit(encoder, startIndex, indexCount); fixed(float4x4 *p = boneMatrices) { bgfx.encoder_set_uniform(encoder, sys->m_skinnedMeshShadowMapShader.m_uniformBoneMatrices, p, (ushort)boneMatrices.Length); } EncodeShadowMap(sys, encoder, ref sys->m_skinnedMeshShadowMapShader.m_shadowMapShader, viewId, ref tx, flipCulling, bias); }
public static unsafe void EncodeLitSkinnedMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, ref LitMaterialBGFX mat, ref LightingBGFX lighting, ref float4x4 viewTx, int startIndex, int indexCount, byte flipCulling, ref LightingViewSpaceBGFX viewSpaceLightCache, uint depth, float4x4[] boneMatrices) { mesh.SetForSubmit(encoder, startIndex, indexCount); fixed(float4x4 *p = boneMatrices) { bgfx.encoder_set_uniform(encoder, sys->m_litSkinnedMeshShader.m_uniformBoneMatrices, p, (ushort)boneMatrices.Length); } EncodeLit(sys, encoder, ref sys->m_litSkinnedMeshShader.m_litShader, viewId, ref tx, ref mat, ref lighting, ref viewTx, flipCulling, ref viewSpaceLightCache, depth); }
// ---------------- shadow map ---------------------------------------------------------------------------------------------------------------------- public static unsafe void EncodeShadowMapMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, int startIndex, int indexCount, byte flipCulling, float4 bias) { #if DEBUG float4 cd = GetShadowDebugColor(mesh.DebugIndex() + startIndex); #endif mesh.SetForSubmit(encoder, startIndex, indexCount); EncodeShadowMap(sys, encoder, ref sys->m_shadowMapShader, viewId, ref tx, flipCulling, bias #if DEBUG , cd #endif ); }
public static unsafe void EncodeSimpleMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, ref SimpleMaterialBGFX mat, int startIndex, int indexCount, byte flipCulling, uint depth) { mesh.SetForSubmit(encoder, startIndex, indexCount); EncodeSimple(sys, encoder, viewId, ref tx, ref mat, flipCulling, depth); }
public static unsafe void EncodeZOnlyMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, int startIndex, int indexCount, byte flipCulling) { mesh.SetForSubmit(encoder, startIndex, indexCount); EncodeZOnly(sys, encoder, viewId, ref tx, flipCulling); }
public static unsafe void EncodeShadowMapMesh(RendererBGFXInstance *sys, bgfx.Encoder *encoder, ushort viewId, ref MeshBGFX mesh, ref float4x4 tx, int startIndex, int indexCount, byte flipCulling, float4 bias) { mesh.SetForSubmit(encoder, startIndex, indexCount); EncodeShadowMap(sys, encoder, ref sys->m_shadowMapShader, viewId, ref tx, flipCulling, bias); }