8000 Array uniforms feature request · Issue #8 · faiface/glhf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Array uniforms feature request #8
Open
@shinomontaz

Description

@shinomontaz

It would be nice to have an array uniforms. Useful for dynamic shadows when obstacles are many.
Seems it's can be done by calling gl.Uniform1fv with second param equals to desired array size in shader.go.
Something like this:

case Float:
		value := value.(float32)
		gl.Uniform1fv(s.uniformLoc[uniform], 1, &value)
case FloatArr:
                value := value.([]float32)
		length := int32(len(value))
		gl.Uniform1fv(s.uniformLoc[uniform], length, &value[0])

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

      0