Back to Filament

normalized

docs/android/dokka/filament-android/com.google.android.filament/-vertex-buffer/-builder/normalized.md

1.75.01.5 KB
Original Source

//filament-android/com.google.android.filament/VertexBuffer/Builder/normalized

normalized

[main]
open fun normalized(attribute: VertexBuffer.VertexAttribute): VertexBuffer.Builder

Sets whether a given attribute should be normalized. By default attributes are not normalized. A normalized attribute is mapped between 0 and 1 in the shader. This applies only to integer types.

Return

this Builder object for chaining calls. This is a no-op if the attribute is an invalid enum.

Parameters

main

attributeenum of the attribute to set the normalization flag to

[main]
open fun normalized(attribute: VertexBuffer.VertexAttribute, enabled: Boolean): VertexBuffer.Builder

Sets whether a given attribute should be normalized. By default attributes are not normalized. A normalized attribute is mapped between 0 and 1 in the shader. This applies only to integer types.

Return

this Builder object for chaining calls. This is a no-op if the attribute is an invalid enum.

Parameters

main

attributeenum of the attribute to set the normalization flag to
enabledtrue to automatically normalize the given attribute