Add more improvements
This commit is contained in:
parent
e1c74a8054
commit
bc16bdd62e
29 changed files with 288 additions and 160 deletions
|
|
@ -18,7 +18,8 @@ export class UniformArrayAutoScalingProgram implements IProgram {
|
|||
constructor(
|
||||
private gl: WebGL2RenderingContext,
|
||||
shaderSources: [string, string],
|
||||
private descriptors: Array<DrawableDescriptor>
|
||||
private descriptors: Array<DrawableDescriptor>,
|
||||
private substitutions: { [name: string]: any }
|
||||
) {
|
||||
for (const combination of getCombinations(
|
||||
descriptors.map((o) => o.shaderCombinationSteps)
|
||||
|
|
@ -75,6 +76,7 @@ export class UniformArrayAutoScalingProgram implements IProgram {
|
|||
shaderSources: [string, string]
|
||||
): FragmentShaderOnlyProgram {
|
||||
const substitutions = {
|
||||
...this.substitutions,
|
||||
macroDefinitions: this.getMacroDefinitions(combination, descriptors),
|
||||
declarations: this.getDeclarations(combination, descriptors),
|
||||
functionCalls: this.getFunctionCalls(combination, descriptors),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue