Restructured deferred lighting/rendering

This commit is contained in:
2020-05-12 15:19:05 -05:00
parent 7c81dd93e3
commit dae950c72a
14 changed files with 152 additions and 225 deletions

View File

@@ -8,15 +8,6 @@ class IMICFPS
window.needs_cursor = false
@manifest = @options[:manifest]
if window.config.get(:debug_options, :use_shaders) && !Shader.available?("default")
Shader.new(
name: "default",
includes_dir: "shaders/include",
vertex: "shaders/vertex/default.glsl",
fragment: "shaders/fragment/default.glsl"
)
end
@map = ProtoMap.new
Publisher.new
@@ -27,7 +18,7 @@ class IMICFPS
@crosshair = Crosshair.new(color: Gosu::Color.rgba(100, 200, 255, 100))
@lights = []
@light = Light.new(id: available_light, position: Vector.new, diffuse: Vector.new(1, 1, 1, 1))
@light = Light.new(type: Light::DIRECTIONAL, id: available_light, position: Vector.new, diffuse: Vector.new(1, 1, 1, 1))
@lights << @light
@camera = Camera.new(position: Vector.new(0, 1.5, 5), orientation: Vector.forward)