DynamicLight | A new Dynamic Light fixed from avalon 's version
kandi X-RAY | DynamicLight Summary
kandi X-RAY | DynamicLight Summary
A new Dynamic Light fixed from avalon's sample to work with cocos2dx version 3.x.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DynamicLight
DynamicLight Key Features
DynamicLight Examples and Code Snippets
Community Discussions
Trending Discussions on DynamicLight
QUESTION
I have issues with HLSL Buffer alignment. I have a light struct in an array of size 48 (i.e. a shader is meant to hold atmost 48 lights). (Divisiors are markers of 16 byte boundaries)
...ANSWER
Answered 2020-Nov-30 at 13:30As you've correctly noted on the C++ side, your ShaderLight data just contains 72 Bytes of 'used' data and has therefore 8 bytes of padding at the end. However, on the HLSL side, these 8 padding bytes are not needed for the last element in your array, as the follow-up element (the NumLight integer) can be packed inside these padding bytes.
You could fix this easily by specifying the int pad[2];
not just on the C++ side, but also in your HLSL code.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DynamicLight
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page