updated voxelizer

This commit is contained in:
turanszkij
2017-03-05 02:12:37 +01:00
parent b565b4a08e
commit 3f2a940ef3
3 changed files with 3 additions and 4 deletions
+2
View File
@@ -18,6 +18,8 @@ void main( uint3 DTid : SV_DispatchThreadID )
{
//float3 normal = DecodeNormal(voxel.normalMask);
//// try to make it temporally more stable:
//output_emission[writecoord] = lerp(output_emission[writecoord], float4(color.rgb, 1), 0.1);
output_emission[writecoord] = float4(color.rgb, 1);
}
else
+1 -1
View File
@@ -21,7 +21,7 @@ VSOut main( uint vertexID : SV_VERTEXID, uint instanceID : SV_INSTANCEID )
float3 pos = (float3)coord / g_xWorld_VoxelRadianceDataRes * 2 - 1;
pos.y = -pos.y;
pos *= g_xWorld_VoxelRadianceDataRes;
pos += CUBE[vertexID].xyz;
pos += CUBE[vertexID].xyz + float3(1,-1,1);
pos *= g_xWorld_VoxelRadianceDataRes * g_xWorld_VoxelRadianceDataSize / g_xWorld_VoxelRadianceDataRes;
o.pos = mul(float4(pos, 1), g_xTransform);
-3
View File
@@ -4016,9 +4016,6 @@ void wiRenderer::VoxelRadiance( GRAPHICSTHREAD threadID )
RenderMeshes(center, culledRenderer, SHADERTYPE_VOXELIZE, RENDERTYPE_OPAQUE, threadID);
voxelSceneData.center = center;
GetDevice()->BindRenderTargets(0, nullptr, nullptr, threadID);