-
Notifications
You must be signed in to change notification settings - Fork 60
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
Shadowmaps #1209
Comments
I suppose shadows are expected to be cast by dynamic lights only? Since the information isn't really there for lights baked into the map. It's possible to instruct q3map2 not to remove point light entities, but then everyone says you should be using light emitting shaders anyway. |
IT would be a good start, yes.
Indeed light entities could be used when not removed, and surfaces using light emitting shaders too (would require to also parse those keywords), when the shader is properly shipped with the map (it was possible to not ship some shaders if the image had the same name as the shader and some special effects like image scrolling were not used). I wonder if we can also average some lightgrid direction. |
Yeah, some information would be required for any shadows. I'm assuming light emitting shaders essentially work as spotlights where everything between where the light source would be and the surface itself is ignored? (and light falloff not applying until getting to the surface of course) |
Basically, yes. In fact the map compiler spawns a kind of spotlight every given subdivision, and this subdivision can be configured, but considering it as a spotlight at first would be good enough (and we may not want to render so many shadows anyway).
I don't get this part of the sentence. |
Averaging the lightgrid is possible and that's what we did in the past. It's just not super accurate, but if the shadows look nice, it still looks nice :) I don't think we have any information about light emitting shaders except the light grid, which is super lossy. |
The light emitting shader works like this:
A light is spawn a bit in front of the surface having a light emitting shader, with a back splash. The distance of the light to the surface, and the intensity of the backsplash is configurable independently to the main light intensity.
More details here: http://q3map2.robotrenegade.com/docs/shader_manual/q3map-global-directives.html |
Hmm, interesting. How is the light cone size calculated though? I'm not seeing any mention of that. At least some light source for such surfaces can probably be combined to avoid building more shadowmaps. |
I guess we can iterate every surface of the geometry, compute the position in space, pick the material name, lookup for the shader, parse it and see if there is some light emitting keywords in its body.
I even don't know if it's a cone, but I guess it's somewhat biased into some direction if it needs a backlight. |
It may also be an half-sphere. |
This issue is to keep track of necessary steps and progress for implementing shadowmaps in the tiled renderer.
Required:
Optional:
The text was updated successfully, but these errors were encountered: