https://github.com/rifleh700/dynamic_object_shader
MTA:SA dynamic object shader
https://github.com/rifleh700/dynamic_object_shader
hlsl mta mtasa multitheftauto shader
Last synced: 21 days ago
JSON representation
MTA:SA dynamic object shader
- Host: GitHub
- URL: https://github.com/rifleh700/dynamic_object_shader
- Owner: rifleh700
- License: mit
- Created: 2023-12-17T10:54:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-27T13:36:12.000Z (12 months ago)
- Last Synced: 2025-07-27T15:44:53.413Z (12 months ago)
- Topics: hlsl, mta, mtasa, multitheftauto, shader
- Language: Lua
- Homepage:
- Size: 4.88 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dynamic_object_shader
> [!IMPORTANT]
> **New function [setElementLighting](https://wiki.multitheftauto.com/wiki/SetElementLighting) is available (since 1.6.0 r22862)!
> Please just use **client-side** script below instead of this shader.**
> ```lua
>
> addEventHandler("onClientPedsProcessed", root,
> function()
> for i, object in ipairs(getElementsByType("object", root, true)) do
> local attachedTo = getElementAttachedTo(object)
> if attachedTo then
> local lighting = getElementLighting(attachedTo)
> if lighting then
> setElementLighting(object, lighting)
> end
> end
> end
> end
> )
> ```
> [!NOTE]
> Also I found a little difference between shader and function. If you want check it - start this resource and use `dos [modelID]` command.
MTA:SA dynamic object shader resource. It fixes attached objects lighting. Works with ped/player/vehicle/etc.
