Files
filament/samples/materials/sandboxTransformName.mat
rafadevai 9da29e3ab7 Add new public API to query a sampler transform name field. (#9320)
* Add new public API to query a sampler transform name field.

This new API will let filament users query a Material object
the value of the `transformName` field of a specified sampler
parameter.

The transformName is an optional field, so if its not defined
by the user, it will return a nullptr value.

- A new test was added to test_filamat to validate the serialization.
- A new parameter was added to the test sandboxLit material to
validate the parsing a material with the new field.

* Addressing review comments

- Add java and js bindings for the new API
- Tests for querying the getParameterTransformName

* Use utils::ImmutableCString for transformName

* Updating release notes

* Review comments

* Addressing more review comments

- Fix comments
- For the java binding return an empty string when the
transform is not present.
2025-10-21 23:55:25 +00:00

43 lines
837 B
Plaintext

material {
name : LitOpaque,
shadingModel : lit,
parameters : [
{
type : samplerExternal,
name : sampler,
transformName : transform
},
{
type : samplerExternal,
name : videoTexture,
transformName : videoTransform
},
{
type : sampler2d,
name : sampler1,
},
{
type : samplerExternal,
name : sampler2,
},
{
type : sampler2d,
name : sampler3,
},
{
type : int,
name : paramInt
},
{
type : float,
name : paramFloat
}
]
}
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
}
}