Skip to content

Releases: yoyoberenguer/PygameShader

New version 1.0.10

14 Oct 10:26
402dc0e
Compare
Choose a tag to compare

Version 1.0.10 is out

Fastest and improved version of PygameShader, 15-20% faster CPU algorithms

New CPU demonstrations available:

  • demo_burst
  • demo_burst_exp (experimental)
  • demo_fire_border
  • demo_predator
  • demo_magnifier
  • demo_rain
  • demo_ripple
  • demo_transition_inplace
  • demo_tunnel
  • demo_wave_static

Added following Cython flags to all libraries and methods
@cython.profile(False)
@cython.initializedcheck(False)

Fast math operations by using C float precision e.g cosf, sinf, atanf etc.
This changes apply only for windows version AMD64 and Win32 (all libraries using libc.math)
Linux versions is still using double precision

Added Fast RGB to HSL color conversion model for a given color
cpdef inline hsl _rgb_to_hsl(unsigned char r, unsigned char g, unsigned char b)nogil
cpdef inline rgb _hsl_to_rgb(float h, float s, float l)nogil

Added fast RGB to HSV color conversion model for a given color
cpdef inline hsv _rgb_to_hsv(unsigned char r, unsigned char g, unsigned char b)nogil
cpdef inline rgb _hsv_to_rgb(float h, float s, float v)nogil

What's changed

Renamed various Cython methods (cdef & cpdef methods) to simplify
Improved and simplified many CPU algorithms.
Version 1.0.10 is 10-20% faster than 1.0.9

New BlendFlags library.

This library is similar to Pygame special flags attribute.
Unlike Pygame, where only surface can be blend together, this library allow you
to blend directly 3d arrays(w, h, 3) and 2d arrays shape (w, h) together (texture vs texture or
alpha channels vs alpha).
Blending array together is much faster than converting both surfaces into equivalent
arrays or converting arrays into Surfaces to blend pixels together.
Removing unnecessary steps improved the performances and can make your game or code running
much faster when you need to apply transformation to the array level and not textures.

Added blit_s function (blend a sprite to an image or surface)
Added blend_add_surface (blend surfaces, equivalent to BLEND_RGB_ADD)
Added blend_add_array (blend two 3d arrays together, equivalent to BLEND_RGB_ADD for arrays)
Added blend_add_alpha (blend two 2d arrays together, equivalent to BLEND_RGB_ADD for alpha channels)
Added blend_sub_surface (blend surfaces, equivalent to BLEND_RGB_SUB)
Added blend_sub_array (same for arrays)
Added blend_min_surface (blend surfaces, equ to BLEND_ADD_MIN)
Added blend_min_array (same for arrays)
Added blend_max_surface (blend surface with BLEND_RGB_MAX flag)
Added blend_max_array (same for arrays)

New BurstSurface library

This library provides new tools to transform PNG & JPG images into multiple sub-surfaces or pixels block.
It contains tools to produce images explosion/burst into pixels or pixel's block, check the demo demo_burst and
demo_burt_exp (experimental version with _sdl library).
Tools for disassembling or reassembling images from exploded pixels

Added pixel_block_rgb (extract sprites from a sprite-sheet)
Added surface_split used by burst method to decompose an image into pixel blocks)
Added burst (explode a Pygame surface into multiple sub-surface )
Added display_burst (Display an exploded image on the Pygame display)
Added rebuild_from_frame (Rebuild an exploded image)
Added burst_into_memory (Burst image in memory)
Added rebuild_from_memory (Rebuild image from memory)

-- experimental with _sdl library--
Added burst_experimental (explode a surface into multiple sub-surfaces)
Added db_experimental (display burst)
Added rff_experimental (rebuild from a specific frame number)
Added rfm_experimental (rebuild from memory)
Added build_surface_inplace (build a surface from a sprite group inplace)
Added build_surface_inplace_fast (build surface from a sprite group, same than above but faster)

New library Sprites

This is the Pygame sprite module Cythonized

Library misc

New algorithm for scrolling surfaces or arrays, check demo demo_scroll

Added scroll24 (scroll surface horizontally / vertically)
Added scroll24_inplace (same but inplace)
Added scroll24_arr_inplace (same but for 3d arrays)
Added surface_copy (equivalent tp pygame surface copy)

Library Palette

Changed the palettes arrays to with dataset float32 types

Changed C file Shaderlib.c to perform fast math operations instead of double precision

Version 1.0.9

08 Jul 21:07
758cd31
Compare
Choose a tag to compare

Version 1.0.9

Version compatible with python 3.11

Dithering bug correction (Multi-thread causing image demarcation) + correction of rounding issue
Replaced method dithering_int with dithering_inplace
Added bloc size for the pixelation algorithm.

Added palettes

  • AAP64
  • APOLLO
  • FUNKYFUTURE
  • VINIK24
  • TWILIOQUEST76
  • IRIDESCENTCRYSTAL
  • AAPSPLENDOR128
  • LOSPEC500
  • FAMICUBE

Renamed YIQ CPU methods
cpdef void Luma_GreyScale(object surface_)
cpdef void Luma_GreyScale_c(unsigned char [:, :, :] rgb_array)

cpdef void RGB_TO_YIQ_Q0_inplace(object surface_)
cpdef void RGB_TO_YIQ_Q0_inplace_c(unsigned char [:, :, :] rgb_array)

cpdef void RGB_TO_YIQ_I0_inplace(object surface_)
cpdef void RGB_TO_YIQ_I0_inplace_c(unsigned char [:, :, :] rgb_array)

cpdef void RGB_TO_YIQ_Y0_inplace(object surface_)
cpdef void RGB_TO_YIQ_Y0_inplace_c(unsigned char [:, :, :] rgb_array)

Added tunnel_modeling24 and tunnel_render24

Fixed bugs in
shader_median_filter24_inplace_c(arr, median_kernel_)
shader_median_filter24_inplace_heapsort_c(arr, median_kernel_)
shader_median_grayscale_filter24_inplace_c(arr, median_kernel_)

Fixed bug in Heapify

version 1.0.8

20 Aug 23:29
9784373
Compare
Choose a tag to compare

New GPU wavelength_map_gpu
New GPU heatmap_gpu
new CPU shader_rgb_to_yiq_inplace
new CPU shader_rgb_to_yiq_i_comp_inplace
new CPU shader_rgb_to_yiq_q_comp_inplace

ADDED CPU METHOD FOR
create_horizontal_gradient_1d
create_horizontal_gradient_1d_alpha
object horizontal_grad3d
object horizontal_grad3d_alpha
create_radial_gradient
create_radial_gradient_alpha
create_quarter_radial_gradient
create_quarter_radial_gradient_alpha

Removed fast cpdef object bilateral_fast_gpu(surface_, unsigned int kernel_size_)
Removed cdef bilateral_fast_cupy(gpu_array_, unsigned int kernel_size_)

version 1.0.7

09 Jul 15:45
d603558
Compare
Choose a tag to compare

Version 1.0.7

new GPU rgb_split_gpu
new GPU chromatic 
new GPU zoom 

improved bloom effect for moving objects and particles,
this version is also faster (less sub-surface used to generate the bloom)

new CPU shader_bloom_fast1  (works for moving objects) 
new CPU chromatic 
new CPU zoom

Removed CPU median_avg 

version 1.0.6

26 Jun 20:46
cb339a4
Compare
Choose a tag to compare

VERSION 1.0.6

Corrective for version 1.0.5
Removed the import CUPY from the init.py file to allow independent usage of CPU shaders and GPU shaders

version 1.0.5

26 Jun 16:18
cb339a4
Compare
Choose a tag to compare

VERSION 1.0.5

Bug correction in shader_median_filter24_inplace_c
Bug correction in shader_plasma24bit_inplace_c (replace t by t_)
Bug correction in fisheye lens (different width and height causing an exception)

Added CPU shader bilinear filter
Added CPU shader alpha_blending
Added CPU shader Light effect 24 bit
Added CPU shader_bloom_fast (much faster)
Added CPU bug corrected in fisheye lens (different width and height would have cause an exception)

Added GPU shader invert
Added GPU shader sepia
Added GPU shader bpf
Added GPU shader grayscale
Added GPU shader median
Added GPU shader gaussian
Added GPU shader sobel
Added GPU shader prewitt
Added GPU shader canny
Added GPU shader color_reduction
Added GPU shader hsv
Added GPU shader downscale array & upscale array
Addef GPU shader bloom low performance, to be re-written
Added GPU shader cartoon
Added GPU shader blending
Added GPU shader sharpen
Added GPU shader ripple
Added GPU shader mirroring
Added GPU shader saturation
Added GPU shader bilateral filter
Added GPU shader emboss
Added GPU shader Light effect
Added GPU shader brightness
Added GPU shader saturation
Added GPU shader hsl
Added GPU shader fisheye
Added GPU shader swirl
Added GPU shader wave

New release v1.0.3

01 May 18:02
56bcc6b
Compare
Choose a tag to compare

New version 1.0.3

Version 1.0.3

New version that includes new features and few bug corrections.
The shaders names have been completely reviewed to simplify the function calls from user perspective.
The previous versions (before 1.0.3) will no longer match the naming convention and will no longer be compatible with the documentation
and WIKI explanation tab.

Bug correction

rgb_split
Swirl and swirl2

color_reduction

New features

blending mode for Predator mode
new algorithm dirt_lens effect
Dithering algorithm
Color_palette
bilateral filter
emboss filter
pixelation
convert to 27 colors
spectrum surface
horizontal gradient (unit misc.pyx)
New transition effect (blend effect)

New release v1.0.2

12 Dec 14:28
1030ccf
Compare
Choose a tag to compare

New release v1.0.2

  • cartoon effect shader and demo files
  • previous version 1.0.1 is obsolete (Yank on PYPI)

New release v1.0.0

12 Dec 13:16
0b58ba5
Compare
Choose a tag to compare
Update README.md