Skip to content

Commit

Permalink
Remove unused file, add set_active to RenderStage
Browse files Browse the repository at this point in the history
  • Loading branch information
tobspr committed Jan 16, 2016
1 parent b24c291 commit 290eca2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 111 deletions.
5 changes: 5 additions & 0 deletions Code/RenderStage.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ def update(self):
stages to perform custom updates """
pass

def set_active(self, active):
""" Enables or disables all targets bound to this stage """
for target in self._targets.values():
target.set_active(active)

def _make_cubemap_filter(self, *args):
""" Creates a new CubemapFilter with the given args and returns it """
return CubemapFilter(self, *args)
Expand Down
2 changes: 0 additions & 2 deletions Code/Util/CubemapFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def _make_diffuse_target(self):
self._diffuse_target = self._stage._create_target(self._name + "DiffuseIBL")
self._diffuse_target.set_size(CubemapFilter.PREFILTER_CUBEMAP_SIZE * 6,
CubemapFilter.PREFILTER_CUBEMAP_SIZE)
self._diffuse_target.add_color_texture()
self._diffuse_target.prepare_offscreen_buffer()

self._diffuse_target.set_shader_input("SourceCubemap", self._specular_map.texture)
Expand All @@ -164,7 +163,6 @@ def _make_diffuse_target(self):
self._diff_filter_target = self._stage._create_target(self._name + "DiffPrefIBL")
self._diff_filter_target.set_size(CubemapFilter.DIFFUSE_CUBEMAP_SIZE * 6,
CubemapFilter.DIFFUSE_CUBEMAP_SIZE)
self._diff_filter_target.add_color_texture()
self._diff_filter_target.prepare_offscreen_buffer()

self._diff_filter_target.set_shader_input("SourceCubemap", self._prefilter_map.texture)
Expand Down
5 changes: 1 addition & 4 deletions Plugins/Scattering/ScatteringStage.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ def set_shaders(self):
self._load_plugin_shader("ApplyScattering.frag.glsl"))
self._target_cube.set_shader(
self._load_plugin_shader("ScatteringEnvmap.frag.glsl"))

self._filter.set_shaders()
# mip_shader = self._load_plugin_shader("DownsampleEnvmap.frag.glsl")
# for target in self._mip_targets:
# target.set_shader(mip_shader)


def resize(self):
RenderStage.resize(self)
Expand Down
102 changes: 0 additions & 102 deletions Shader/Includes/ImportanceSampling/ImportanceSampleLambert.inc.glsl

This file was deleted.

3 changes: 0 additions & 3 deletions Shader/Stages/IBLCubemapDiffuse.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ uniform samplerCube SourceCubemap;
uniform writeonly imageCube RESTRICT DestCubemap;
uniform int cubeSize;

out vec4 result;

void main() {
const int sample_count = 64;

Expand Down Expand Up @@ -78,5 +76,4 @@ void main() {
accum /= weights;

imageStore(DestCubemap, ivec3(clamped_coord, face), vec4(accum, 1) );
result = vec4(accum, 1);
}

0 comments on commit 290eca2

Please sign in to comment.