secondlife / secondlife/viewer
Add New Parameters to Mirror and Rotate the PRIM_PROJECTOR Texture
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 299
- Forks
- 146
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 88
Description
Currently, light sources utilizing a Projector Texture casts the texture "correctly" when observing the surface of whatever the light is cast upon. However, if you also have the same texture on the object face of for example a TV screen casting light into a room, the projected texture appears wrongly_mirrored compared to the texture itself on the screen. The current workaround is to mirror the texture/image before uploading and then flip the Horizontal scale of the texture face it is applied to on the object.
Current Flag Parameters are as follows:
[ PRIM_PROJECTOR, string texture, float fov, float focus, float ambiance ]
My Suggestion -- Add the params "integer boolean" (TRUE or FALSE to set horizontal scale of the projector texture to 1 or -1 to mirror it) and "float rotation_in_radians" (just in case the object's rotation is not aligned with the projector's native emission direction) as follows:
[ PRIM_PROJECTOR, string texture, integer boolean, float rotation_in_radians, float fov, float focus, float ambiance ]
The only use case I can think of that this solves a problem for is TV displays casting their applied texture as a light without having to mirror the texture manually before uploading, but there are likely other uses this can be helpful for. Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the PRIM_PROJECTOR scripting entry point and trace how projector textures are applied; the issue does not name a file or test. Review the linked Canny proposal for context, then determine the affected rendering and scripting paths. Done means the proposed mirror and rotation parameters are accepted and produce the intended projected orientation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100