diff options
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/scenegraph.js')
-rwxr-xr-x | js/helper-classes/RDGE/src/core/script/scenegraph.js | 306 |
1 files changed, 153 insertions, 153 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/scenegraph.js b/js/helper-classes/RDGE/src/core/script/scenegraph.js index 44f1212f..92fe98c8 100755 --- a/js/helper-classes/RDGE/src/core/script/scenegraph.js +++ b/js/helper-classes/RDGE/src/core/script/scenegraph.js | |||
@@ -74,8 +74,8 @@ RDGE.SceneGraph = function (scene) { | |||
74 | this.bckTypes = RDGE.rdgeConstants.categoryEnumeration; | 74 | this.bckTypes = RDGE.rdgeConstants.categoryEnumeration; |
75 | 75 | ||
76 | this.renderList = new Array(this.bckTypes.MAX_CAT); | 76 | this.renderList = new Array(this.bckTypes.MAX_CAT); |
77 | this.renderList[this.bckTypes.BACKGROUND] = []; //BACKGROUND | 77 | this.renderList[this.bckTypes.BACKGROUND] = []; //BACKGROUND |
78 | this.renderList[this.bckTypes.OPAQUE] = []; //OPAQUE | 78 | this.renderList[this.bckTypes.OPAQUE] = []; //OPAQUE |
79 | this.renderList[this.bckTypes.TRANSPARENT] = []; //TRANSPARENT | 79 | this.renderList[this.bckTypes.TRANSPARENT] = []; //TRANSPARENT |
80 | this.renderList[this.bckTypes.ADDITIVE] = []; //ADDITIVE | 80 | this.renderList[this.bckTypes.ADDITIVE] = []; //ADDITIVE |
81 | this.renderList[this.bckTypes.TRANSLUCENT] = []; //TRANSLUCENT | 81 | this.renderList[this.bckTypes.TRANSLUCENT] = []; //TRANSLUCENT |
@@ -89,127 +89,127 @@ RDGE.SceneGraph = function (scene) { | |||
89 | 89 | ||
90 | // define passes to render geometry and handle post-processing | 90 | // define passes to render geometry and handle post-processing |
91 | this.defaultPassDef = | 91 | this.defaultPassDef = |
92 | { | 92 | { |
93 | // a pass can have children that will receive their parents output as input | 93 | // a pass can have children that will receive their parents output as input |
94 | 94 | ||
95 | // this pass renders the depth map to an off-screen target - from the shadow lights view | 95 | // this pass renders the depth map to an off-screen target - from the shadow lights view |
96 | // you can specify what your output should be | 96 | // you can specify what your output should be |
97 | // @param name - this tells jshader's of child passes (which receive the parents output as input) | 97 | // @param name - this tells jshader's of child passes (which receive the parents output as input) |
98 | // what the sampler2d uniform name will be for this output texture | 98 | // what the sampler2d uniform name will be for this output texture |
99 | // @param type - the type of output could be tex2d or target | 99 | // @param type - the type of output could be tex2d or target |
100 | // @param width - optional width of the render target | 100 | // @param width - optional width of the render target |
101 | // @param height - optional height of the render target | 101 | // @param height - optional height of the render target |
102 | // @param mips - optional flag indicating whether the render target will support mip-mapping | 102 | // @param mips - optional flag indicating whether the render target will support mip-mapping |
103 | 103 | ||
104 | // the geometry pass | 104 | // the geometry pass |
105 | 'name': "geoPass", | 105 | 'name': "geoPass", |
106 | 'geometrySet': "ALL" | 106 | 'geometrySet': "ALL" |
107 | // 'outputs':[{ 'name':"u_mainRT", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 107 | // 'outputs':[{ 'name':"u_mainRT", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |
108 | // 'children': | 108 | // 'children': |
109 | // [ | 109 | // [ |
110 | // // shadow pass | 110 | // // shadow pass |
111 | // { | 111 | // { |
112 | // 'outputs':[{ 'name':"u_shadowDepthMap", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 112 | // 'outputs':[{ 'name':"u_shadowDepthMap", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |
113 | // // custom parameter | 113 | // // custom parameter |
114 | // 'name':"shadowDepthMap", | 114 | // 'name':"shadowDepthMap", |
115 | // 'shader': RDGE.rdgeDepthMapShaderDef, | 115 | // 'shader': RDGE.rdgeDepthMapShaderDef, |
116 | // 'technique':"shadowDepthMap", | 116 | // 'technique':"shadowDepthMap", |
117 | // 'geometrySet':"SHADOW", | 117 | // 'geometrySet':"SHADOW", |
118 | // 'children': | 118 | // 'children': |
119 | // [ | 119 | // [ |
120 | // // create shadow rt | 120 | // // create shadow rt |
121 | // { | 121 | // { |
122 | // 'outputs':[{ 'name':"u_shadowMap", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 122 | // 'outputs':[{ 'name':"u_shadowMap", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |
123 | // 'name':"shadowMap", | 123 | // 'name':"shadowMap", |
124 | // 'shader': RDGE.rdgeShadowMapShader, | 124 | // 'shader': RDGE.rdgeShadowMapShader, |
125 | // 'clearColor' : [1.0,1.0,1.0,1.0], | 125 | // 'clearColor' : [1.0,1.0,1.0,1.0], |
126 | // 'geometrySet':"SHADOW", | 126 | // 'geometrySet':"SHADOW", |
127 | // } | 127 | // } |
128 | // ] | 128 | // ] |
129 | // }, | 129 | // }, |
130 | // // glow pass | 130 | // // glow pass |
131 | // { | 131 | // { |
132 | // 'outputs':[{ 'name':"sTexture", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 132 | // 'outputs':[{ 'name':"sTexture", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |
133 | // 'name':"glowMap", | 133 | // 'name':"glowMap", |
134 | // 'shader': RDGE.rdgeGlowMapShader, | 134 | // 'shader': RDGE.rdgeGlowMapShader, |
135 | // 'clearColor' : [0.0,0.0,0.0,1.0], | 135 | // 'clearColor' : [0.0,0.0,0.0,1.0], |
136 | // 'technique':"createGlowMap", | 136 | // 'technique':"createGlowMap", |
137 | // 'geometrySet':"ALL", | 137 | // 'geometrySet':"ALL", |
138 | // 'children': | 138 | // 'children': |
139 | // [ | 139 | // [ |
140 | // { // the blur pass at half resolution | 140 | // { // the blur pass at half resolution |
141 | // 'name':"blurQuarter", | 141 | // 'name':"blurQuarter", |
142 | // 'geometrySet':"SCREEN_QUAD", | 142 | // 'geometrySet':"SCREEN_QUAD", |
143 | // 'shader': RDGE.rdgeGaussianBlurShader, | 143 | // 'shader': RDGE.rdgeGaussianBlurShader, |
144 | // 'outputs':[{ 'name':"sTexture", 'type':"target", 'width':256, 'height':256, 'mips':false }], | 144 | // 'outputs':[{ 'name':"sTexture", 'type':"target", 'width':256, 'height':256, 'mips':false }], |
145 | // 'children': | 145 | // 'children': |
146 | // [ | 146 | // [ |
147 | // { // the blur pass at half resolution | 147 | // { // the blur pass at half resolution |
148 | // 'name':"blurThreeQuarter", | 148 | // 'name':"blurThreeQuarter", |
149 | // 'geometrySet':"SCREEN_QUAD", | 149 | // 'geometrySet':"SCREEN_QUAD", |
150 | // 'shader': RDGE.rdgeGaussianBlurShader, | 150 | // 'shader': RDGE.rdgeGaussianBlurShader, |
151 | // 'outputs':[{ 'name':"sTexture", 'type':"target", 'width':128, 'height':128, 'mips':false }], | 151 | // 'outputs':[{ 'name':"sTexture", 'type':"target", 'width':128, 'height':128, 'mips':false }], |
152 | // 'children': | 152 | // 'children': |
153 | // [ | 153 | // [ |
154 | // { // the blur pass at quarter resolution | 154 | // { // the blur pass at quarter resolution |
155 | // 'name':"blurFull", | 155 | // 'name':"blurFull", |
156 | // 'geometrySet':"SCREEN_QUAD", | 156 | // 'geometrySet':"SCREEN_QUAD", |
157 | // 'shader': RDGE.rdgeGaussianBlurShader, | 157 | // 'shader': RDGE.rdgeGaussianBlurShader, |
158 | // 'outputs':[{ 'name':"u_glowFinal", 'type':"target", 'width':1024, 'height':1024, 'mips':false }] | 158 | // 'outputs':[{ 'name':"u_glowFinal", 'type':"target", 'width':1024, 'height':1024, 'mips':false }] |
159 | // } | 159 | // } |
160 | // ] | 160 | // ] |
161 | // } | 161 | // } |
162 | // ] | 162 | // ] |
163 | // } | 163 | // } |
164 | // ] | 164 | // ] |
165 | // }, | 165 | // }, |
166 | // // depth map in view space | 166 | // // depth map in view space |
167 | // { | 167 | // { |
168 | // 'name':"depth_map", | 168 | // 'name':"depth_map", |
169 | // 'shader': RDGE.rdgeDepthMapShaderDef, | 169 | // 'shader': RDGE.rdgeDepthMapShaderDef, |
170 | // 'technique': "depthMap", | 170 | // 'technique': "depthMap", |
171 | // 'outputs':[{ 'name':"u_depthMap", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 171 | // 'outputs':[{ 'name':"u_depthMap", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |
172 | // 'geometrySet':"ALL", | 172 | // 'geometrySet':"ALL", |
173 | // 'children' : | 173 | // 'children' : |
174 | // [ | 174 | // [ |
175 | // // get the normals in view space | 175 | // // get the normals in view space |
176 | // { | 176 | // { |
177 | // 'name':"normals", | 177 | // 'name':"normals", |
178 | // 'shader': RDGE.rdgeViewSpaceNormalsShader, | 178 | // 'shader': RDGE.rdgeViewSpaceNormalsShader, |
179 | // 'outputs':[{ 'name':"u_normalsRT", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 179 | // 'outputs':[{ 'name':"u_normalsRT", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |
180 | // 'geometrySet':"ALL", | 180 | // 'geometrySet':"ALL", |
181 | // 'children' : | 181 | // 'children' : |
182 | // [ | 182 | // [ |
183 | // // techniques requiring depth and normals in view space go here | 183 | // // techniques requiring depth and normals in view space go here |
184 | // | 184 | // |
185 | // // SSAO map | 185 | // // SSAO map |
186 | // { | 186 | // { |
187 | // 'name':"SSAO", | 187 | // 'name':"SSAO", |
188 | // 'shader': RDGE.rdgeSSAOShader, | 188 | // 'shader': RDGE.rdgeSSAOShader, |
189 | // 'outputs':[{ 'name':"u_ssaoRT", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], | 189 | // 'outputs':[{ 'name':"u_ssaoRT", 'type':"target", 'width':1024, 'height':1024, 'mips':false }], |