Skip to content

No way to set ProgramGenerator::Function::outputArraySizeSource from snippet files #1

Description

@cmdrf

ProgramGenerator::Function::outputArraySizeSource is used to determine the array size of the return value of a function. In this example, lightDirectionArray is supposed to inherit the array size from lightPositionArray:

vertex
vec3[] lightDirectionArray(vec4[] lightPositionArray, vec4 vertexPosition, mat4 modelViewMatrix)
{
	for(int i = 0; i < lightDirectionArray.length(); i++)
	{
		lightDirectionArray[i] = -normalize(lightPositionArray[i].xyz - (modelMatrix * vertexPosition).xyz);
	}
}

You can do that in C++ with

lightDirectionArray.outputArraySizeSource = "lightPositionArray"_H;

but not from the text file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions