Forward rendering with simple shadow mapping works now.
parent
54d67cdeac
commit
03a3b856d7
|
@ -82,7 +82,7 @@ void main() {
|
|||
// diffuse lighting
|
||||
vec3 normal_dir = normalize(ioFragNormal);
|
||||
// vec3 light_dir = normalize(uLightDirection);
|
||||
vec3 light_dir = transpose(inverse(mat3(uViewMatrix * uModelMatrix))) * uLightDirection;
|
||||
vec3 light_dir = - transpose(inverse(mat3(uViewMatrix * uModelMatrix))) * uLightDirection;
|
||||
float diff = max(dot(normal_dir, light_dir), 0.0);
|
||||
vec4 diffuse = diff * albedo_color;
|
||||
|
||||
|
|
|
@ -1141,9 +1141,9 @@ void Renderer::DrawGui() {
|
|||
switch (sRendererSettings.RenderMode) {
|
||||
case SceneRenderModeDefault:
|
||||
mRenderTextureRef.mTextureIdPtr =
|
||||
&mRenderTarget.mColorTexture;
|
||||
// &mRenderTarget.mColorTexture;
|
||||
// &mDeferredLightingTarget.mColorTexture;
|
||||
// mUseDeferred ? &mDeferredLightingTarget.mColorTexture : &mRenderTarget.mColorTexture;
|
||||
mUseDeferred ? &mDeferredLightingTarget.mColorTexture : &mRenderTarget.mColorTexture;
|
||||
break;
|
||||
case SceneRenderModeColor:
|
||||
mRenderTextureRef.mTextureIdPtr = &mRenderTarget.mColorTexture;
|
||||
|
|
Loading…
Reference in New Issue