public ConservativeTester(LightSpaceTransformer transformer, int width, int height) { ColorSamples = new ColorTexture2D(width, height); GL.BindImageTexture(3, ColorSamples.TextureId, 0, false, 0, TextureAccess.ReadWrite, ColorSamples.InternalFormat()); SampleShader.SetMatrix4("lightTransform", transformer.LightTransform); }
public FragPosSampler(List <Mesh> scene, Camera defaultCam) { Scene = scene; DefaultCam = defaultCam; SampleShader.SetMatrix4("view", DefaultCam.View); SampleShader.SetMatrix4("proj", DefaultCam.Projection); SampleImage = new ColorTexture2D(DefaultCam.Width, DefaultCam.Height); SampleDepthStencilBuffer = new DepthStencilTexture(DefaultCam.Width, DefaultCam.Height); SampleBuffer.Bind(); SampleImage.AttachToFramebuffer(FramebufferAttachment.ColorAttachment0); SampleDepthStencilBuffer.AttachToFramebuffer(FramebufferAttachment.DepthStencilAttachment); Framebuffer.BindDefault(); }