[Closed] Dynamic shadows in Krypton XNA

Hello community. Now i working on Krypton XNA (v2.0) C# port for MonoGame 3.5
I successfully ported it, everything works, but shadows…

Issue:
Dynamic shadows this is thing that doesn’t work, i tried some logic variants but got the same.
Personally i don’t have any ideas how to fix it. =(
I compile it under Visual Studio 2013 for OpenGL (Windows 7 x64) using latest version of MonoGame (3.5).
Shader i compile with using 2MGFX.exe (.fx -> .mgfx).

Screenshot:


Here is links:
My Project (.fx source of effect placed in “Content” folder)
Krypton XNA v2.0

Any suggestions?

P.S. Sorry for my bad English =)

Regards, TheZNC.

Today tried to use older MonoGame versions (from 3.2 to 3.4).
As result i get only gray screen with DebugDraw() working.
Probably because shader compiling, old 2MGFX.exe in the line:
ColorWriteEnable = Red | Green | Blue; in KryptonEffect.fx drops an error.

Just tested on development MonoGame build (3.6), shadows still doesn’t work.
Also tried to change Draw() sequence, but got the same.
Now I try to understand how Krypton works, logic and others…

[Here is .FX source] (https://krypton.codeplex.com/SourceControl/latest#Krypton/KryptonTestbed/KryptonTestbedContent/KryptonEffect.fx) (Official source control of Krypton-XNA v2.0)

Try to change the shaders from 2_0 to 4_0

If I understand correctly, I had to change everything in the .FX source from 2_0 to 4_0?
(Unfortunately now i dont have experience in working with shaders).
So I did it, but the error occurred during the compilation (2MGFX.exe):
Invalid profile 'vs_4_0'. Vertex shader 'VS_ScreenCopy' must be SM 3.0 or lower!
Then i changed all to 3_0 and… Success, shader compiled!
Use new shader, everything is OK but shadows still don’t work. =(

Also I noticed that I use bit older Krypton version in my project. It differs from source control’s version (and sure .FX too).
I downloaded the latest version, ported it to MonoGame 3.5
Compiled new shader with 2MGFX.exe, and as reuslt i get black screen with debugDraw() working.
Got the same result when I changed all in new .FX from 2_0 to 3_0.
With 4_0, 2MGFX.exe still drops an error.

Screenshot:

Has anyone ever successfully ported Krypton v2.0 for MonoGame (any version)?

Personally i think that Krypton is best solution to adding 2D dynamic light system for your game.
Thus, when this problem will be solved, I plan to publish a quality port for MonoGame 3.5+ with examples.

Links:
My new project (with latest Krypton version).
Latest .FX source

There’s a great alternative specifically written for MonoGame:
Penumbra by @Discosultan
At a glance it seems Krypton is very similar to Penumbra in terms of capabilities.

Yes, i know about that engine, but there are some problem. WindowsDX platform. This engine avilable only for DirectX so the game will lose сross-platform. Sure there are some variants like Wine and etc., but i think that many interested in OpenGL version.

Now installing VisualStudio 2015 for new C# 6 syntax. Want to try it out (Penumbra).
Also, I ask the author about the OpenGL version.

But problem with Krypton still opened, waiting for suggestions…

Are you doing 2d? because if you are, you can easily use VertexColorPositions to draw dynamic shadows…

Here is an example

You definitely don’t need to be using Krypton to get 2D poly shadows. This tutorial provides a detailed overview of the algorithm. By actually understanding what is happening under the hood you will be able to fix issues that come up in the future when using the code.

Here are two examples gifs I recently posted with that implementation in MonoGame:

Awesome tutorial. Apparently I will write custom library with this, thanks.

Thanks to all who replied in this thread!

Theme closed, there are alot of alternatives to Krypton.