PixelPaladin

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • in reply to: SDL_PeepEvents error #15381

    PixelPaladin
    Participant

    I often compile and test stuff via command line and whenever I use timers this error appears. While the main window has been closed some part of the program is still running so that I have to close it manually via Ctrl+C. I am not sure whether this bug only appears on Linux.

    in reply to: Lighting with Monkey-X #14640

    PixelPaladin
    Participant

    For shadows on your image you need a normal map. When your image is named “bg.png” the name of the normal map must be “bg_NORMALS.png” (and “bg_SPECULAR.png” for the specular map).

    For objects to have longer shadows there is an example called “renderdemo” which uses shadow casters. To be honest I never used them and implemented my own shaders instead. This approach is a bit more complicated but gives you much more control at the same time.

    in reply to: Lighting with Monkey-X #14638

    PixelPaladin
    Participant

    Okay, it seems like your code works in Cerberus-X when you replace “monkey://data/bg.png” by “cerberus://data/bg.png”.

    in reply to: Lighting with Monkey-X #14634

    PixelPaladin
    Participant

    Well, it was your code. I just did some changes so that I can read it better myself 😉

    I think changing the path should be enough to make it work.

    in reply to: Lighting with Monkey-X #14632

    PixelPaladin
    Participant

    sure, here it is:

    in reply to: Lighting with Monkey-X #14630

    PixelPaladin
    Participant

    For me it works with Cerberus-X when I change the path to just “bg.png” (instead of “monkey://data/bg.png”) with the following file structure:

    in reply to: Compress/Decompress data buffers #14465

    PixelPaladin
    Participant

    Wow – that was fast!

    I already tried it and it works like a charm:

    in reply to: CRT Shader? #12013

    PixelPaladin
    Participant

    I uploaded the crt module and my video module (which uses monkeys theora module) to GitHub:

    crt module:
    https://github.com/PixelPaladin/mx2-crt

    simplevideo module:
    https://github.com/PixelPaladin/mx2-simplevideo

    Both are licensed under the MIT license (I hope that is okay).

    in reply to: CRT Shader? #12000

    PixelPaladin
    Participant

    Okay, now everything should work out of the box with the current version of mojo. I also added a small example application where you can play around with some parameters. All parameters can now be changed on the fly (brightness, contrast, gamma … even the virtual resolution).

    https://www.dropbox.com/s/pvv6l8hqwsth2vm/crt.zip?dl=0

    in reply to: CRT Shader? #11997

    PixelPaladin
    Participant

    Everything should be okay. My code works now (will upload it when it is ready). My mistake was that I used an old makefile which used an older version of mx2cc. Some variable names in the shaders are now different.

    By the way – I am really happy with the way mojo handles shaders now.

    in reply to: CRT Shader? #11990

    PixelPaladin
    Participant

    @therevills: no, sorry. I updated my monkey2 to the newest version and now my code crashes, too. I will try to fix that. Seems like the shader stuff has changed a lot in the last months …

    in reply to: CRT Shader? #11988

    PixelPaladin
    Participant

    Any pointers on how exactly I’d make it happen?

    The idea behind the multi pass approach is to blur in one direction first (let’s say in x direction) and in the next pass blur in the other direction (y). This reduces running time from O(n²) to O(n). In mojo you could render into different images using multiple canvases (I am not sure how efficient this is – maybe there is a better solution to this). To get a soft blur a gauss kernel is often used. It can be statically included into the shader as an array or it can be passed to the shader as a texture. However I cannot figure out how pass stuff to the shader in monkey2’s mojo (everything I tried just crashed my program).

    I didn’t get that part. Can’t you pass values using methods like Image.Material.SetFloat?

    That was what I thought – but I have no idea how to do this. Is there any documentation or a tutorial to this? Let’s say I have a uniform float foo in my shader. What do I need to do to set the value of foo in my monkey source?

    Edit: I figured out, how it works … fixing everything right now.

    in reply to: CRT Shader? #11980

    PixelPaladin
    Participant

    So you used a single-pass approach. Multi-pass would be faster, but if you get 60 fps on Intel graphics it should be absolutely okay (I wanted to implement it but I was too lazy 🙂 )

    Somehow my biggest problem with monkey2’s mojo is that I cannot pass values to shaders. I really don’t like that. The only possibility to pass values to a shader seems to be encoding them into a hidden area of the source image … which seems odd to me.

    in reply to: CRT Shader? #11974

    PixelPaladin
    Participant

    @ethernaut: That looks nice! I like the glow effect. How did you implement it?

    I changed some parameters. The image is now less distorted (but in the corners some pixels are not visible anymore). It is now also possible to set the intensity for rgb splitting (the vertical lines) as well as the intensity of the scan lines (the horizontal lines):

    Attachments:
    in reply to: CRT Shader? #11954

    PixelPaladin
    Participant

    Okay, I wrote a small crt module.

    Get it here:
    https://www.dropbox.com/s/pvv6l8hqwsth2vm/crt.zip?dl=0

    Some example code:

    (only resolutions between 128×64 and 800×600 are allowed)

Viewing 15 posts - 1 through 15 (of 18 total)