Code Monkey home page Code Monkey logo

Comments (4)

yoyoberenguer avatar yoyoberenguer commented on May 14, 2024 1

Bug corrected in version 1.0.4
pip install PygameShader==1.0.4

I have also corrected a bug with demo_fire.py that was not showing the fire effect as intended.

from pygameshader.

yoyoberenguer avatar yoyoberenguer commented on May 14, 2024

Hi and thank you for letting me know,

Please rename shader_bloom_effect_array24 --> bloom instead

Here

import PygameShader
from PygameShader import bloom

and here

    if keys[pygame.K_ESCAPE]:
                    GAME = False
                    break

            bloom(image, BPF, fast_=True)
           
            SCREEN.blit(image, (0, 0))
            pygame.display.flip()

This demo version got the previous name of the bloom algorithm
Note : I renamed all the methods at version 1.0.3 and uploaded the project without changing the demos script
Thank you for reporting this, I will update the demo script to match the new version 1.0.3 to avoid this issue in the future

Let me know if this solved your issue.

PS If you are using python version != 3.8, you would have to compile the source code for your environment.

python setup_shader.py build_ext --inplace --force
This is True if you have downloaded the project from Github website. 
Otherwise please use `pip` to download the right version of the project for your system. 

`pip install PygameShader==1.0.3`


from pygameshader.

yoyoberenguer avatar yoyoberenguer commented on May 14, 2024

You can also found out the methods name in the file shader.pxd

cpdef void saturation(object surface_, float shift_)
cpdef void heatwave_vertical(
        object surface_, unsigned char [:, :] mask, float factor_, float center_,
        float sigma_, float mu_)
cpdef void horizontal_glitch(object surface_, float rad1_, float frequency_,
                                              float amplitude_)
cpdef void bpf(object surface_, int threshold = *)

cpdef void bloom(object surface_, int threshold_, bint fast_=*)

cpdef fisheye_footprint(int w, int h)
cpdef void fisheye(object surface_, unsigned int [:, :, :] fisheye_model)

from pygameshader.

f1refa11 avatar f1refa11 commented on May 14, 2024

Thanks, it now works!

from pygameshader.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.