Felsir / LightingEngine

A 2D Deferred lights implementation for Monogame
http://www.felsirworld.net/deferred-2d-lights/
MIT License
20 stars 1 forks source link

Compiled shaders do not run in FNA/MojoShader #1

Open danielcrenna opened 5 years ago

danielcrenna commented 5 years ago

For whatever reason, this example cannot be ported because MojoShader fails trying to load either shader at runtime. A non-issue for MonoGame, but it means it can't be ported to FNA. Considering that Diffuse/Normal lighting should be standard, I'm wondering if you used any non-standard D3D attributes in these? Could they be simplified with imports?

danielcrenna commented 5 years ago

@Felsir After discussing with a colleague it seems the issue is that FNA relies on an older version of FXC that does not support PS4.0 or its intrinsics, so I'd have to rewrite the sampler states among other things (bringing them client-side to feed the values in) to PS3.0. If I end up tackling this, I'll issue a PR for an FNA-compatible version.

Felsir commented 5 years ago

Great, I wasn’t aware of that. The shader doesn’t do any really spectacular things other than sampling and multiplying values- so I hopefully it will be fairly straightforward. Thank you for your effort!