Fix collision detection
This commit is contained in:
parent
006ab3c4e6
commit
5b4e67cbf0
9 changed files with 169 additions and 49 deletions
|
|
@ -58,7 +58,10 @@ void main() {
|
|||
for (int i = 0; i < CIRCLE_LIGHT_COUNT; i++) {
|
||||
float lightCenterDistance = distance(circleLights[i].center, worldCoordinates);
|
||||
|
||||
|
||||
/*if (lightCenterDistance < circleLights[i].radius) {
|
||||
fragmentColor = vec4(1.0, 1.0, 0.0, 1.0);
|
||||
return;
|
||||
}*/
|
||||
vec3 lightColorAtPosition = circleLights[i].value / pow(
|
||||
lightCenterDistance / LIGHT_DROP + 1.0, 2.0
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue