Fixed publish rendering errors and improved shiny highlight shaders #393
|
@ -78,8 +78,14 @@ void main()
|
|||
outEntityID = In2.eid;
|
||||
lightLayerIndices = In2.lightLayerIndex;
|
||||
|
||||
float vpHeight = float (In2.screenSpacePos.y) - MatProp.data[In2.materialIndex].highlightPosition;
|
||||
vpHeight = float (int (vpHeight) % genericDataBuffer.data.viewportHeight);
|
||||
// float vpHeight = float (In2.screenSpacePos.y) - MatProp.data[In2.materialIndex].highlightPosition;
|
||||
// bring the frame of reference to the object's screen space pos
|
||||
int scale = 470;
|
||||
float vpHeight = float (In2.screenSpacePos.y);
|
||||
float relativePos = float(int (-MatProp.data[In2.materialIndex].highlightPosition) % scale) - float (scale / 2);
|
||||
vpHeight += relativePos;
|
||||
|
||||
// vpHeight = float (int (vpHeight) % genericDataBuffer.data.viewportHeight);
|
||||
float scanlineScale = MatProp.data[In2.materialIndex].thickness * (1.0f - In2.screenSpacePos.z) * 100.0f;
|
||||
|
||||
float lowerLimit = vpHeight - scanlineScale;
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace SHADE
|
|||
|
||||
SHFreetypeInstance::Init();
|
||||
|
||||
SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false);
|
||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false);
|
||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/ShadowMap_FS.glsl", false);
|
||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/ShadowMap_FS.glsl", false);
|
||||
//SHAssetManager::CompileAsset("../../Assets/Shaders/SSAO_CS.glsl", false);
|
||||
|
@ -669,21 +669,21 @@ namespace SHADE
|
|||
#endif
|
||||
}
|
||||
|
||||
static bool shadowAdded = false;
|
||||
//static bool shadowAdded = false;
|
||||
|
||||
if (shadowAdded == false && SHInputManager::GetKey(SHInputManager::SH_KEYCODE::B))
|
||||
{
|
||||
shadowAdded = true;
|
||||
auto& lightComps = SHComponentManager::GetDense<SHLightComponent>();
|
||||
//if (lightComps.size() > 2)
|
||||
//{
|
||||
// lightComps[2].SetEnableShadow(true);
|
||||
//}
|
||||
for (auto& comp : lightComps)
|
||||
{
|
||||
comp.SetEnableShadow(true);
|
||||
}
|
||||
}
|
||||
//if (shadowAdded == false && SHInputManager::GetKey(SHInputManager::SH_KEYCODE::B))
|
||||
//{
|
||||
// shadowAdded = true;
|
||||
// auto& lightComps = SHComponentManager::GetDense<SHLightComponent>();
|
||||
// //if (lightComps.size() > 2)
|
||||
// //{
|
||||
// // lightComps[2].SetEnableShadow(true);
|
||||
// //}
|
||||
// for (auto& comp : lightComps)
|
||||
// {
|
||||
// comp.SetEnableShadow(true);
|
||||
// }
|
||||
//}
|
||||
|
||||
renderGraph->Begin(frameIndex);
|
||||
auto cmdBuffer = renderGraph->GetCommandBuffer(frameIndex);
|
||||
|
|
Loading…
Reference in New Issue