Skip to content

Commit

Permalink
Disabled shadows for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fcvarela committed Jun 26, 2019
1 parent 48bf1d4 commit 22a3543
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
4 changes: 2 additions & 2 deletions cmd/data/programs/ubershader.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ void main() {

vec3 color_spec = NdotL_clamped * brdf_spec * (lights[i].color.rgb*(1.0-metalness) + albedo.rgb*metalness);
vec3 color_diff = NdotL_clamped * diffuse_energy_ratio(f0, N, L) * albedo.rgb * lights[i].color.rgb;
float sh = shadow(vec4(position, 1.0), i);
color.rgb += (color_diff + color_spec) * sh;
float sh = 1.0;//shadow(vec4(position, 1.0), i);
color.rgb += (0.05*albedo.rgb + color_diff + color_spec) * sh;
}

color.a = albedo.a;
Expand Down
11 changes: 1 addition & 10 deletions render/opengl/texture.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,7 @@ func (rs *RenderSystem) NewTexture(d core.TextureDescriptor, data []byte) core.T
// set data
// this texture's storage has already been allocated, just copy the data
if data != nil {
gl.TexSubImage2D(
target,
0,
0,
0,
int32(d.Width),
int32(d.Height),
format,
componentType,
gl.Ptr(data))
gl.TexSubImage2D(target, 0, 0, 0, int32(d.Width), int32(d.Height), format, componentType, gl.Ptr(data))

if d.Mipmaps {
gl.GenerateMipmap(target)
Expand Down
1 change: 0 additions & 1 deletion render/opengl/uniform.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"unsafe"

"github.com/fcvarela/gosg/core"

"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/mathgl/mgl32"
"github.com/go-gl/mathgl/mgl64"
Expand Down

0 comments on commit 22a3543

Please sign in to comment.