Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed shadow map #5940

Merged
merged 3 commits into from Dec 26, 2019
Merged

fixed shadow map #5940

merged 3 commits into from Dec 26, 2019

Conversation

2youyou2
Copy link
Contributor

@2youyou2 2youyou2 commented Dec 20, 2019

Re: cocos/2d-tasks#2165

Changes:

  • fixed shadow map

@@ -11,7 +11,9 @@
};

#pragma builtin(global)
uniform sampler2D cc_shadow_map[CC_MAX_SHADOW_LIGHTS];
Copy link
Contributor Author

@2youyou2 2youyou2 Dec 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sampler2D array 的支持不同平台有点问题,还是展开来获取吧

Copy link
Contributor

@holycanvas holycanvas Dec 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那现在是限定是只有两个灯光能产生阴影么,之前好像是四个?

Copy link
Contributor Author

@2youyou2 2youyou2 Dec 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前也是两个

uniform sampler2D cc_shadow_map[CC_MAX_SHADOW_LIGHTS];
uniform sampler2D cc_shadow_map_0;
#pragma builtin(global)
uniform sampler2D cc_shadow_map_1;
Copy link
Contributor

@holycanvas holycanvas Dec 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里好像应该也加上 #if CC_NUM_SHADOW_LIGHTS > 1 ?

Copy link
Contributor

@holycanvas holycanvas Dec 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面的那个 uniform cc_shadow_map_0 要考虑一个灯光都没有的情况么?

Copy link
Contributor Author

@2youyou2 2youyou2 Dec 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加上了

@holycanvas holycanvas merged commit 6b02f83 into cocos:v2.3.0 Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants