From cdc1ba7e58f2bd154c33e6d02d223f51d38e312b Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 24 Oct 2024 17:40:14 +0700 Subject: [PATCH] autotile --- PixelComposer.yyp | 3 + datafiles/Shaders/sampler.glsl | 86 +++ datafiles/Shaders/sampler_simple.glsl | 13 + datafiles/Shaders/shader_replace.py | 65 +++ pre_build_step.bat | 1 + scripts/__tiler_autotile/__tiler_autotile.gml | 25 +- scripts/__tiler_brush/__tiler_brush.gml | 89 ++- scripts/globals/globals.gml | 2 +- scripts/node_attributes/node_attributes.gml | 3 +- scripts/node_composite/node_composite.gml | 1 - scripts/node_tiler/node_tiler.gml | 507 +++++++++++++++--- scripts/shader_functions/shader_functions.gml | 1 + .../tiler_tool_brush_shape.gml | 28 +- scripts/tiler_tool_fill/tiler_tool_fill.gml | 14 +- shaders/sh_2d_light/sh_2d_light.fsh_mod | 1 + shaders/sh_2d_light/sh_2d_light.vsh_mod | 1 + shaders/sh_3d_depth/sh_3d_depth.fsh_mod | 1 + shaders/sh_3d_depth/sh_3d_depth.vsh_mod | 1 + .../sh_3d_extrude_corner.fsh_mod | 1 + .../sh_3d_extrude_corner.vsh_mod | 1 + .../sh_3d_extrude_filler.fsh_mod | 1 + .../sh_3d_extrude_filler.vsh_mod | 1 + .../sh_3d_extrude_filler_depth.fsh_mod | 1 + .../sh_3d_extrude_filler_depth.vsh_mod | 1 + shaders/sh_BGR/sh_BGR.fsh_mod | 1 + shaders/sh_BGR/sh_BGR.vsh_mod | 1 + .../sh_FLIP_draw_droplet.fsh_mod | 1 + .../sh_FLIP_draw_droplet.vsh_mod | 1 + .../sh_FLIP_render_threshold.fsh_mod | 1 + .../sh_FLIP_render_threshold.vsh_mod | 1 + shaders/sh_FXAA/sh_FXAA.fsh_mod | 1 + shaders/sh_FXAA/sh_FXAA.vsh_mod | 1 + shaders/sh_ace/sh_ace.fsh_mod | 1 + shaders/sh_ace/sh_ace.vsh_mod | 1 + .../sh_active_canvas_ink.fsh_mod | 1 + .../sh_active_canvas_ink.vsh_mod | 1 + .../sh_alpha_cutoff/sh_alpha_cutoff.fsh_mod | 1 + .../sh_alpha_cutoff/sh_alpha_cutoff.vsh_mod | 1 + shaders/sh_alpha_grey/sh_alpha_grey.fsh_mod | 1 + shaders/sh_alpha_grey/sh_alpha_grey.vsh_mod | 1 + shaders/sh_alpha_hash/sh_alpha_hash.fsh_mod | 1 + shaders/sh_alpha_hash/sh_alpha_hash.vsh_mod | 1 + shaders/sh_ani_noise/sh_ani_noise.fsh_mod | 1 + shaders/sh_ani_noise/sh_ani_noise.vsh_mod | 1 + shaders/sh_atlas/sh_atlas.fsh_mod | 1 + shaders/sh_atlas/sh_atlas.vsh_mod | 1 + shaders/sh_atlas_scan/sh_atlas_scan.fsh_mod | 1 + shaders/sh_atlas_scan/sh_atlas_scan.vsh_mod | 1 + shaders/sh_average/sh_average.fsh_mod | 1 + shaders/sh_average/sh_average.vsh_mod | 1 + shaders/sh_bend_arc/sh_bend_arc.fsh_mod | 1 + shaders/sh_bend_arc/sh_bend_arc.vsh_mod | 1 + shaders/sh_bevel/sh_bevel.fsh | 40 +- shaders/sh_bevel/sh_bevel.fsh_mod | 1 + shaders/sh_bevel/sh_bevel.vsh_mod | 1 + shaders/sh_bevel_highp/sh_bevel_highp.fsh | 40 +- shaders/sh_bevel_highp/sh_bevel_highp.fsh_mod | 1 + shaders/sh_bevel_highp/sh_bevel_highp.vsh_mod | 1 + shaders/sh_blend_add/sh_blend_add.fsh_mod | 1 + shaders/sh_blend_add/sh_blend_add.vsh_mod | 1 + .../sh_blend_add_alpha_adj.fsh_mod | 1 + .../sh_blend_add_alpha_adj.vsh_mod | 1 + .../sh_blend_alpha_addition.fsh_mod | 1 + .../sh_blend_alpha_addition.vsh_mod | 1 + .../sh_blend_color_burn.fsh_mod | 1 + .../sh_blend_color_burn.vsh_mod | 1 + .../sh_blend_color_dodge.fsh_mod | 1 + .../sh_blend_color_dodge.vsh_mod | 1 + .../sh_blend_contrast.fsh_mod | 1 + .../sh_blend_contrast.vsh_mod | 1 + .../sh_blend_difference.fsh_mod | 1 + .../sh_blend_difference.vsh_mod | 1 + .../sh_blend_divide/sh_blend_divide.fsh_mod | 1 + .../sh_blend_divide/sh_blend_divide.vsh_mod | 1 + shaders/sh_blend_edge/sh_blend_edge.fsh_mod | 1 + shaders/sh_blend_edge/sh_blend_edge.vsh_mod | 1 + .../sh_blend_edge_blend.fsh_mod | 1 + .../sh_blend_edge_blend.vsh_mod | 1 + .../sh_blend_edge_extract.fsh_mod | 1 + .../sh_blend_edge_extract.vsh_mod | 1 + .../sh_blend_exclusion.fsh_mod | 1 + .../sh_blend_exclusion.vsh_mod | 1 + .../sh_blend_hard_light.fsh_mod | 1 + .../sh_blend_hard_light.vsh_mod | 1 + shaders/sh_blend_hue/sh_blend_hue.fsh_mod | 1 + shaders/sh_blend_hue/sh_blend_hue.vsh_mod | 1 + .../sh_blend_linear_burn.fsh_mod | 1 + .../sh_blend_linear_burn.vsh_mod | 1 + .../sh_blend_linear_dodge.fsh_mod | 1 + .../sh_blend_linear_dodge.vsh_mod | 1 + .../sh_blend_linear_light.fsh_mod | 1 + .../sh_blend_linear_light.vsh_mod | 1 + shaders/sh_blend_luma/sh_blend_luma.fsh_mod | 1 + shaders/sh_blend_luma/sh_blend_luma.vsh_mod | 1 + shaders/sh_blend_max/sh_blend_max.fsh_mod | 1 + shaders/sh_blend_max/sh_blend_max.vsh_mod | 1 + shaders/sh_blend_min/sh_blend_min.fsh_mod | 1 + shaders/sh_blend_min/sh_blend_min.vsh_mod | 1 + .../sh_blend_multiply.fsh_mod | 1 + .../sh_blend_multiply.vsh_mod | 1 + .../sh_blend_normal/sh_blend_normal.fsh_mod | 1 + .../sh_blend_normal/sh_blend_normal.vsh_mod | 1 + .../sh_blend_normal_dim.fsh_mod | 1 + .../sh_blend_normal_dim.vsh_mod | 1 + .../sh_blend_overlay/sh_blend_overlay.fsh_mod | 1 + .../sh_blend_overlay/sh_blend_overlay.vsh_mod | 1 + .../sh_blend_pin_light.fsh_mod | 1 + .../sh_blend_pin_light.vsh_mod | 1 + .../sh_blend_replace/sh_blend_replace.fsh_mod | 1 + .../sh_blend_replace/sh_blend_replace.vsh_mod | 1 + shaders/sh_blend_sat/sh_blend_sat.fsh_mod | 1 + shaders/sh_blend_sat/sh_blend_sat.vsh_mod | 1 + .../sh_blend_screen/sh_blend_screen.fsh_mod | 1 + .../sh_blend_screen/sh_blend_screen.vsh_mod | 1 + .../sh_blend_soft_light.fsh_mod | 1 + .../sh_blend_soft_light.vsh_mod | 1 + .../sh_blend_subtract.fsh_mod | 1 + .../sh_blend_subtract.vsh_mod | 1 + .../sh_blend_vivid_light.fsh_mod | 1 + .../sh_blend_vivid_light.vsh_mod | 1 + shaders/sh_blend_xor/sh_blend_xor.fsh_mod | 1 + shaders/sh_blend_xor/sh_blend_xor.vsh_mod | 1 + .../sh_blink_expand/sh_blink_expand.fsh_mod | 1 + .../sh_blink_expand/sh_blink_expand.vsh_mod | 1 + .../sh_blink_extract/sh_blink_extract.fsh_mod | 1 + .../sh_blink_extract/sh_blink_extract.vsh_mod | 1 + .../sh_blink_replace/sh_blink_replace.fsh_mod | 1 + .../sh_blink_replace/sh_blink_replace.vsh_mod | 1 + shaders/sh_blobify/sh_blobify.fsh_mod | 1 + shaders/sh_blobify/sh_blobify.vsh_mod | 1 + shaders/sh_bloom_pass/sh_bloom_pass.fsh_mod | 1 + shaders/sh_bloom_pass/sh_bloom_pass.vsh_mod | 1 + shaders/sh_blur_alpha/sh_blur_alpha.fsh_mod | 1 + shaders/sh_blur_alpha/sh_blur_alpha.vsh_mod | 1 + shaders/sh_blur_bokeh/sh_blur_bokeh.fsh_mod | 1 + shaders/sh_blur_bokeh/sh_blur_bokeh.vsh_mod | 1 + .../sh_blur_box_contrast.fsh_mod | 1 + .../sh_blur_box_contrast.vsh_mod | 1 + .../sh_blur_directional.fsh | 44 +- .../sh_blur_directional.fsh_mod | 1 + .../sh_blur_directional.vsh_mod | 1 + shaders/sh_blur_final/sh_blur_final.fsh_mod | 1 + shaders/sh_blur_final/sh_blur_final.vsh_mod | 1 + shaders/sh_blur_gaussian/sh_blur_gaussian.fsh | 40 +- .../sh_blur_gaussian/sh_blur_gaussian.fsh_mod | 1 + .../sh_blur_gaussian/sh_blur_gaussian.vsh_mod | 1 + shaders/sh_blur_path/sh_blur_path.fsh_mod | 1 + shaders/sh_blur_path/sh_blur_path.vsh_mod | 1 + shaders/sh_blur_radial/sh_blur_radial.fsh | 190 ++++--- shaders/sh_blur_radial/sh_blur_radial.fsh_mod | 1 + shaders/sh_blur_radial/sh_blur_radial.vsh_mod | 1 + shaders/sh_blur_shape/sh_blur_shape.fsh | 42 +- shaders/sh_blur_shape/sh_blur_shape.fsh_mod | 1 + shaders/sh_blur_shape/sh_blur_shape.vsh_mod | 1 + shaders/sh_blur_simple/sh_blur_simple.fsh | 42 +- shaders/sh_blur_simple/sh_blur_simple.fsh_mod | 1 + shaders/sh_blur_simple/sh_blur_simple.vsh_mod | 1 + shaders/sh_blur_slope/sh_blur_slope.fsh | 176 +++--- shaders/sh_blur_slope/sh_blur_slope.fsh_mod | 1 + shaders/sh_blur_slope/sh_blur_slope.vsh_mod | 1 + shaders/sh_blur_zoom/sh_blur_zoom.fsh | 43 +- shaders/sh_blur_zoom/sh_blur_zoom.fsh_mod | 1 + shaders/sh_blur_zoom/sh_blur_zoom.vsh_mod | 1 + shaders/sh_box_pattern/sh_box_pattern.fsh_mod | 1 + shaders/sh_box_pattern/sh_box_pattern.vsh_mod | 1 + .../sh_brush_linear/sh_brush_linear.fsh_mod | 1 + .../sh_brush_linear/sh_brush_linear.vsh_mod | 1 + .../sh_brush_outline/sh_brush_outline.fsh_mod | 1 + .../sh_brush_outline/sh_brush_outline.vsh_mod | 1 + shaders/sh_bw/sh_bw.fsh_mod | 1 + shaders/sh_bw/sh_bw.vsh_mod | 1 + shaders/sh_camera/sh_camera.fsh | 40 +- shaders/sh_camera/sh_camera.fsh_mod | 1 + shaders/sh_camera/sh_camera.vsh_mod | 1 + .../sh_canvas_apply_draw.fsh_mod | 1 + .../sh_canvas_apply_draw.vsh_mod | 1 + .../sh_canvas_corner/sh_canvas_corner.fsh_mod | 1 + .../sh_canvas_corner/sh_canvas_corner.vsh_mod | 1 + .../sh_canvas_extrude.fsh_mod | 1 + .../sh_canvas_extrude.vsh_mod | 1 + .../sh_canvas_inset/sh_canvas_inset.fsh_mod | 1 + .../sh_canvas_inset/sh_canvas_inset.vsh_mod | 1 + shaders/sh_canvas_mask/sh_canvas_mask.fsh_mod | 1 + shaders/sh_canvas_mask/sh_canvas_mask.vsh_mod | 1 + shaders/sh_canvas_skew/sh_canvas_skew.fsh_mod | 1 + shaders/sh_canvas_skew/sh_canvas_skew.vsh_mod | 1 + shaders/sh_cell_noise/sh_cell_noise.fsh_mod | 1 + shaders/sh_cell_noise/sh_cell_noise.vsh_mod | 1 + .../sh_cell_noise_crystal.fsh_mod | 1 + .../sh_cell_noise_crystal.vsh_mod | 1 + .../sh_cell_noise_edge.fsh_mod | 1 + .../sh_cell_noise_edge.vsh_mod | 1 + .../sh_cell_noise_random.fsh_mod | 1 + .../sh_cell_noise_random.vsh_mod | 1 + .../sh_cell_noise_round.fsh_mod | 1 + .../sh_cell_noise_round.vsh_mod | 1 + shaders/sh_channel_A/sh_channel_A.fsh_mod | 1 + shaders/sh_channel_A/sh_channel_A.vsh_mod | 1 + .../sh_channel_A_grey.fsh_mod | 1 + .../sh_channel_A_grey.vsh_mod | 1 + shaders/sh_channel_B/sh_channel_B.fsh_mod | 1 + shaders/sh_channel_B/sh_channel_B.vsh_mod | 1 + .../sh_channel_B_grey.fsh_mod | 1 + .../sh_channel_B_grey.vsh_mod | 1 + shaders/sh_channel_G/sh_channel_G.fsh_mod | 1 + shaders/sh_channel_G/sh_channel_G.vsh_mod | 1 + .../sh_channel_G_grey.fsh_mod | 1 + .../sh_channel_G_grey.vsh_mod | 1 + shaders/sh_channel_H/sh_channel_H.fsh_mod | 1 + shaders/sh_channel_H/sh_channel_H.vsh_mod | 1 + shaders/sh_channel_R/sh_channel_R.fsh_mod | 1 + shaders/sh_channel_R/sh_channel_R.vsh_mod | 1 + shaders/sh_channel_R2A/sh_channel_R2A.fsh_mod | 1 + shaders/sh_channel_R2A/sh_channel_R2A.vsh_mod | 1 + shaders/sh_channel_R2B/sh_channel_R2B.fsh_mod | 1 + shaders/sh_channel_R2B/sh_channel_R2B.vsh_mod | 1 + shaders/sh_channel_R2G/sh_channel_R2G.fsh_mod | 1 + shaders/sh_channel_R2G/sh_channel_R2G.vsh_mod | 1 + shaders/sh_channel_R2R/sh_channel_R2R.fsh_mod | 1 + shaders/sh_channel_R2R/sh_channel_R2R.vsh_mod | 1 + .../sh_channel_R_grey.fsh_mod | 1 + .../sh_channel_R_grey.vsh_mod | 1 + shaders/sh_channel_S/sh_channel_S.fsh_mod | 1 + shaders/sh_channel_S/sh_channel_S.vsh_mod | 1 + shaders/sh_channel_V/sh_channel_V.fsh_mod | 1 + shaders/sh_channel_V/sh_channel_V.vsh_mod | 1 + .../sh_checkerboard/sh_checkerboard.fsh_mod | 1 + .../sh_checkerboard/sh_checkerboard.vsh_mod | 1 + .../sh_chromatic_aberration.fsh | 167 +++--- .../sh_chromatic_aberration.fsh_mod | 1 + .../sh_chromatic_aberration.vsh_mod | 1 + shaders/sh_clean_shape/sh_clean_shape.fsh_mod | 1 + shaders/sh_clean_shape/sh_clean_shape.vsh_mod | 1 + .../sh_color_adjust/sh_color_adjust.fsh_mod | 1 + .../sh_color_adjust/sh_color_adjust.vsh_mod | 1 + .../sh_color_picker_hue.fsh_mod | 1 + .../sh_color_picker_hue.vsh_mod | 1 + .../sh_color_picker_side_hue.fsh_mod | 1 + .../sh_color_picker_side_hue.vsh_mod | 1 + .../sh_color_picker_side_value.fsh_mod | 1 + .../sh_color_picker_side_value.vsh_mod | 1 + .../sh_color_picker_value.fsh_mod | 1 + .../sh_color_picker_value.vsh_mod | 1 + .../sh_color_remove/sh_color_remove.fsh_mod | 1 + .../sh_color_remove/sh_color_remove.vsh_mod | 1 + .../sh_color_replace/sh_color_replace.fsh_mod | 1 + .../sh_color_replace/sh_color_replace.vsh_mod | 1 + .../sh_color_select_content.fsh_mod | 1 + .../sh_color_select_content.vsh_mod | 1 + .../sh_color_select_side.fsh_mod | 1 + .../sh_color_select_side.vsh_mod | 1 + shaders/sh_colorize/sh_colorize.fsh_mod | 1 + shaders/sh_colorize/sh_colorize.vsh_mod | 1 + .../sh_colours_replace.fsh_mod | 1 + .../sh_colours_replace.vsh_mod | 1 + shaders/sh_combine_hsv/sh_combine_hsv.fsh_mod | 1 + shaders/sh_combine_hsv/sh_combine_hsv.vsh_mod | 1 + shaders/sh_combine_rgb/sh_combine_rgb.fsh_mod | 1 + shaders/sh_combine_rgb/sh_combine_rgb.vsh_mod | 1 + .../sh_content_sampler.fsh_mod | 1 + .../sh_content_sampler.vsh_mod | 1 + shaders/sh_convolution/sh_convolution.fsh | 36 +- shaders/sh_convolution/sh_convolution.fsh_mod | 1 + shaders/sh_convolution/sh_convolution.vsh_mod | 1 + shaders/sh_coord/sh_coord.fsh_mod | 1 + shaders/sh_coord/sh_coord.vsh_mod | 1 + shaders/sh_corner/sh_corner.fsh_mod | 1 + shaders/sh_corner/sh_corner.vsh_mod | 1 + .../sh_corner_erode/sh_corner_erode.fsh_mod | 1 + .../sh_corner_erode/sh_corner_erode.vsh_mod | 1 + .../sh_corner_iterate.fsh_mod | 1 + .../sh_corner_iterate.vsh_mod | 1 + .../sh_cross_histogram.fsh_mod | 1 + .../sh_cross_histogram.vsh_mod | 1 + .../sh_cross_section/sh_cross_section.fsh_mod | 1 + .../sh_cross_section/sh_cross_section.vsh_mod | 1 + shaders/sh_curve/sh_curve.fsh_mod | 1 + shaders/sh_curve/sh_curve.vsh_mod | 1 + shaders/sh_curve_hsv/sh_curve_hsv.fsh_mod | 1 + shaders/sh_curve_hsv/sh_curve_hsv.vsh_mod | 1 + .../sh_d3d_3d_transform.fsh_mod | 1 + .../sh_d3d_3d_transform.vsh_mod | 1 + .../sh_d3d_background.fsh_mod | 1 + .../sh_d3d_background.vsh_mod | 1 + shaders/sh_d3d_default/sh_d3d_default.fsh_mod | 1 + shaders/sh_d3d_default/sh_d3d_default.vsh_mod | 1 + .../sh_d3d_extrude_extends.fsh_mod | 1 + .../sh_d3d_extrude_extends.vsh_mod | 1 + .../sh_d3d_geometry/sh_d3d_geometry.fsh_mod | 1 + .../sh_d3d_geometry/sh_d3d_geometry.vsh_mod | 1 + .../sh_d3d_grid_view/sh_d3d_grid_view.fsh_mod | 1 + .../sh_d3d_grid_view/sh_d3d_grid_view.vsh_mod | 1 + shaders/sh_d3d_normal/sh_d3d_normal.fsh_mod | 1 + shaders/sh_d3d_normal/sh_d3d_normal.vsh_mod | 1 + .../sh_d3d_normal_blur.fsh_mod | 1 + .../sh_d3d_normal_blur.vsh_mod | 1 + shaders/sh_d3d_outline/sh_d3d_outline.fsh_mod | 1 + shaders/sh_d3d_outline/sh_d3d_outline.vsh_mod | 1 + .../sh_d3d_shadow_cube_depth.fsh_mod | 1 + .../sh_d3d_shadow_cube_depth.vsh_mod | 1 + .../sh_d3d_shadow_depth.fsh_mod | 1 + .../sh_d3d_shadow_depth.vsh_mod | 1 + .../sh_d3d_silhouette.fsh_mod | 1 + .../sh_d3d_silhouette.vsh_mod | 1 + shaders/sh_d3d_ssao/sh_d3d_ssao.fsh_mod | 1 + shaders/sh_d3d_ssao/sh_d3d_ssao.vsh_mod | 1 + .../sh_d3d_ssao_blur/sh_d3d_ssao_blur.fsh_mod | 1 + .../sh_d3d_ssao_blur/sh_d3d_ssao_blur.vsh_mod | 1 + .../sh_d3d_wireframe/sh_d3d_wireframe.fsh_mod | 1 + .../sh_d3d_wireframe/sh_d3d_wireframe.vsh_mod | 1 + shaders/sh_de_corner/sh_de_corner.fsh_mod | 1 + shaders/sh_de_corner/sh_de_corner.vsh_mod | 1 + shaders/sh_de_stray/sh_de_stray.fsh_mod | 1 + shaders/sh_de_stray/sh_de_stray.vsh_mod | 1 + shaders/sh_default/sh_default.fsh_mod | 1 + shaders/sh_default/sh_default.vsh_mod | 1 + .../sh_dialog_palette_selector.fsh_mod | 1 + .../sh_dialog_palette_selector.vsh_mod | 1 + .../sh_diffuse_dissipate.fsh_mod | 1 + .../sh_diffuse_dissipate.vsh_mod | 1 + .../sh_diffuse_flow/sh_diffuse_flow.fsh_mod | 1 + .../sh_diffuse_flow/sh_diffuse_flow.vsh_mod | 1 + .../sh_diffuse_post/sh_diffuse_post.fsh_mod | 1 + .../sh_diffuse_post/sh_diffuse_post.vsh_mod | 1 + shaders/sh_dilate/sh_dilate.fsh | 189 ++++--- shaders/sh_dilate/sh_dilate.fsh_mod | 1 + shaders/sh_dilate/sh_dilate.vsh_mod | 1 + shaders/sh_displace/sh_displace.fsh | 183 ++++--- shaders/sh_displace/sh_displace.fsh_mod | 1 + shaders/sh_displace/sh_displace.vsh_mod | 1 + shaders/sh_dither/sh_dither.fsh_mod | 1 + shaders/sh_dither/sh_dither.vsh_mod | 1 + .../sh_dither_screen/sh_dither_screen.fsh_mod | 1 + .../sh_dither_screen/sh_dither_screen.vsh_mod | 1 + shaders/sh_downsample/sh_downsample.fsh_mod | 1 + shaders/sh_downsample/sh_downsample.vsh_mod | 1 + shaders/sh_draw_color/sh_draw_color.fsh_mod | 1 + shaders/sh_draw_color/sh_draw_color.vsh_mod | 1 + shaders/sh_draw_divide/sh_draw_divide.fsh_mod | 1 + shaders/sh_draw_divide/sh_draw_divide.vsh_mod | 1 + .../sh_draw_downsample.fsh_mod | 1 + .../sh_draw_downsample.vsh_mod | 1 + .../sh_draw_flare_star.fsh_mod | 1 + .../sh_draw_flare_star.vsh_mod | 1 + .../sh_draw_grey_alpha.fsh_mod | 1 + .../sh_draw_grey_alpha.vsh_mod | 1 + shaders/sh_draw_mapping/sh_draw_mapping.fsh | 167 +++--- .../sh_draw_mapping/sh_draw_mapping.fsh_mod | 1 + .../sh_draw_mapping/sh_draw_mapping.vsh_mod | 1 + shaders/sh_draw_normal/sh_draw_normal.fsh_mod | 1 + shaders/sh_draw_normal/sh_draw_normal.vsh_mod | 1 + shaders/sh_draw_r16/sh_draw_r16.fsh_mod | 1 + shaders/sh_draw_r16/sh_draw_r16.vsh_mod | 1 + shaders/sh_draw_r32/sh_draw_r32.fsh_mod | 1 + shaders/sh_draw_r32/sh_draw_r32.vsh_mod | 1 + shaders/sh_draw_r8/sh_draw_r8.fsh_mod | 1 + shaders/sh_draw_r8/sh_draw_r8.vsh_mod | 1 + .../sh_draw_single_channel.fsh_mod | 1 + .../sh_draw_single_channel.vsh_mod | 1 + .../sh_draw_surface/sh_draw_surface.fsh_mod | 1 + .../sh_draw_surface/sh_draw_surface.vsh_mod | 1 + .../sh_draw_surface_part_tiled.fsh_mod | 1 + .../sh_draw_surface_part_tiled.vsh_mod | 1 + .../sh_draw_texture/sh_draw_texture.fsh_mod | 1 + .../sh_draw_texture/sh_draw_texture.vsh_mod | 1 + shaders/sh_draw_tile/sh_draw_tile.fsh | 164 +++--- shaders/sh_draw_tile/sh_draw_tile.fsh_mod | 1 + shaders/sh_draw_tile/sh_draw_tile.vsh_mod | 1 + .../sh_draw_tile_apply.fsh_mod | 1 + .../sh_draw_tile_apply.vsh_mod | 1 + .../sh_draw_tile_apply_selection.fsh_mod | 1 + .../sh_draw_tile_apply_selection.vsh_mod | 1 + .../sh_draw_tile_brush/sh_draw_tile_brush.fsh | 8 +- .../sh_draw_tile_brush.fsh_mod | 1 + .../sh_draw_tile_brush.vsh_mod | 1 + .../sh_draw_tile_clear.fsh_mod | 1 + .../sh_draw_tile_clear.vsh_mod | 1 + shaders/sh_draw_tile_map/sh_draw_tile_map.fsh | 25 +- .../sh_draw_tile_map/sh_draw_tile_map.fsh_mod | 1 + .../sh_draw_tile_map/sh_draw_tile_map.vsh_mod | 1 + .../sh_draw_vertex_aa.fsh_mod | 1 + .../sh_draw_vertex_aa.vsh_mod | 1 + shaders/sh_edge_detect/sh_edge_detect.fsh | 57 +- shaders/sh_edge_detect/sh_edge_detect.fsh_mod | 1 + shaders/sh_edge_detect/sh_edge_detect.vsh_mod | 1 + .../sh_edge_shade_apply.fsh_mod | 1 + .../sh_edge_shade_apply.vsh_mod | 1 + .../sh_edge_shade_convert.fsh_mod | 1 + .../sh_edge_shade_convert.vsh_mod | 1 + .../sh_edge_shade_extract.fsh_mod | 1 + .../sh_edge_shade_extract.vsh_mod | 1 + shaders/sh_erode/sh_erode.fsh_mod | 1 + shaders/sh_erode/sh_erode.vsh_mod | 1 + .../sh_fd_add_velocity_glsl.fsh_mod | 1 + .../sh_fd_add_velocity_glsl.vsh_mod | 1 + .../sh_fd_advect_material_a_16_glsl.fsh_mod | 1 + .../sh_fd_advect_material_a_16_glsl.vsh_mod | 1 + .../sh_fd_advect_material_a_8_glsl.fsh_mod | 1 + .../sh_fd_advect_material_a_8_glsl.vsh_mod | 1 + ...sh_fd_advect_material_rgba_16_glsl.fsh_mod | 1 + ...sh_fd_advect_material_rgba_16_glsl.vsh_mod | 1 + .../sh_fd_advect_material_rgba_8_glsl.fsh_mod | 1 + .../sh_fd_advect_material_rgba_8_glsl.vsh_mod | 1 + .../sh_fd_advect_velocity_0_glsl.fsh_mod | 1 + .../sh_fd_advect_velocity_0_glsl.vsh_mod | 1 + .../sh_fd_advect_velocity_1_glsl.fsh_mod | 1 + .../sh_fd_advect_velocity_1_glsl.vsh_mod | 1 + ..._fd_calculate_pressure_jacobi_glsl.fsh_mod | 1 + ..._fd_calculate_pressure_jacobi_glsl.vsh_mod | 1 + .../sh_fd_calculate_pressure_srj_glsl.fsh_mod | 1 + .../sh_fd_calculate_pressure_srj_glsl.vsh_mod | 1 + ...calculate_velocity_divergence_glsl.fsh_mod | 1 + ...calculate_velocity_divergence_glsl.vsh_mod | 1 + ..._fd_replace_material_advanced_glsl.fsh_mod | 1 + ..._fd_replace_material_advanced_glsl.vsh_mod | 1 + shaders/sh_fd_repulse/sh_fd_repulse.fsh_mod | 1 + shaders/sh_fd_repulse/sh_fd_repulse.vsh_mod | 1 + ...fd_subtract_pressure_gradient_glsl.fsh_mod | 1 + ...fd_subtract_pressure_gradient_glsl.vsh_mod | 1 + .../sh_fd_turbulence/sh_fd_turbulence.fsh_mod | 1 + .../sh_fd_turbulence/sh_fd_turbulence.vsh_mod | 1 + .../sh_fd_velocity_combine.fsh_mod | 1 + .../sh_fd_velocity_combine.vsh_mod | 1 + .../sh_fd_visualize_colorize_glsl.fsh_mod | 1 + .../sh_fd_visualize_colorize_glsl.vsh_mod | 1 + ...sualize_pixel_art_fiery_smoke_glsl.fsh_mod | 1 + ...sualize_pixel_art_fiery_smoke_glsl.vsh_mod | 1 + ...h_fd_visualize_pixel_art_fire_glsl.fsh_mod | 1 + ...h_fd_visualize_pixel_art_fire_glsl.vsh_mod | 1 + .../sh_fd_visualize_pressure_glsl.fsh_mod | 1 + .../sh_fd_visualize_pressure_glsl.vsh_mod | 1 + .../sh_fd_visualize_thick_smoke_glsl.fsh_mod | 1 + .../sh_fd_visualize_thick_smoke_glsl.vsh_mod | 1 + ...visualize_velocity_divergence_glsl.fsh_mod | 1 + ...visualize_velocity_divergence_glsl.vsh_mod | 1 + .../sh_fd_visualize_velocity_glsl.fsh_mod | 1 + .../sh_fd_visualize_velocity_glsl.vsh_mod | 1 + shaders/sh_fd_vortex/sh_fd_vortex.fsh_mod | 1 + shaders/sh_fd_vortex/sh_fd_vortex.vsh_mod | 1 + .../sh_find_boundary/sh_find_boundary.fsh_mod | 1 + .../sh_find_boundary/sh_find_boundary.vsh_mod | 1 + .../sh_find_boundary_stretch_x.fsh_mod | 1 + .../sh_find_boundary_stretch_x.vsh_mod | 1 + .../sh_find_boundary_stretch_y.fsh_mod | 1 + .../sh_find_boundary_stretch_y.vsh_mod | 1 + shaders/sh_find_pixel/sh_find_pixel.fsh_mod | 1 + shaders/sh_find_pixel/sh_find_pixel.vsh_mod | 1 + shaders/sh_flip/sh_flip.fsh_mod | 1 + shaders/sh_flip/sh_flip.vsh_mod | 1 + .../sh_flood_fill_it/sh_flood_fill_it.fsh_mod | 1 + .../sh_flood_fill_it/sh_flood_fill_it.vsh_mod | 1 + .../sh_flood_fill_replace.fsh_mod | 1 + .../sh_flood_fill_replace.vsh_mod | 1 + .../sh_flood_fill_thres.fsh_mod | 1 + .../sh_flood_fill_thres.vsh_mod | 1 + .../sh_fluid_bleach/sh_fluid_bleach.fsh_mod | 1 + .../sh_fluid_bleach/sh_fluid_bleach.vsh_mod | 1 + .../sh_freeform_fill_cleanup.fsh_mod | 1 + .../sh_freeform_fill_cleanup.vsh_mod | 1 + .../sh_freeform_fill_pass1.fsh_mod | 1 + .../sh_freeform_fill_pass1.vsh_mod | 1 + .../sh_freeform_fill_pass2.fsh_mod | 1 + .../sh_freeform_fill_pass2.vsh_mod | 1 + shaders/sh_gamma_map/sh_gamma_map.fsh_mod | 1 + shaders/sh_gamma_map/sh_gamma_map.vsh_mod | 1 + .../sh_get_max_downsampled.fsh_mod | 1 + .../sh_get_max_downsampled.vsh_mod | 1 + .../sh_get_min_downsampled.fsh_mod | 1 + .../sh_get_min_downsampled.vsh_mod | 1 + shaders/sh_glow/sh_glow.fsh_mod | 1 + shaders/sh_glow/sh_glow.vsh_mod | 1 + shaders/sh_gradient/sh_gradient.fsh_mod | 1 + shaders/sh_gradient/sh_gradient.vsh_mod | 1 + .../sh_gradient_display.fsh_mod | 1 + .../sh_gradient_display.vsh_mod | 1 + .../sh_gradient_display_alpha.fsh_mod | 1 + .../sh_gradient_display_alpha.vsh_mod | 1 + .../sh_gradient_points.fsh_mod | 1 + .../sh_gradient_points.vsh_mod | 1 + shaders/sh_grain/sh_grain.fsh_mod | 1 + shaders/sh_grain/sh_grain.vsh_mod | 1 + shaders/sh_grey_alpha/sh_grey_alpha.fsh_mod | 1 + shaders/sh_grey_alpha/sh_grey_alpha.vsh_mod | 1 + shaders/sh_greyscale/sh_greyscale.fsh_mod | 1 + shaders/sh_greyscale/sh_greyscale.vsh_mod | 1 + shaders/sh_grid/sh_grid.fsh_mod | 1 + shaders/sh_grid/sh_grid.vsh_mod | 1 + shaders/sh_grid_hex/sh_grid_hex.fsh_mod | 1 + shaders/sh_grid_hex/sh_grid_hex.vsh_mod | 1 + shaders/sh_grid_noise/sh_grid_noise.fsh_mod | 1 + shaders/sh_grid_noise/sh_grid_noise.vsh_mod | 1 + .../sh_grid_pentagonal.fsh_mod | 1 + .../sh_grid_pentagonal.vsh_mod | 1 + shaders/sh_grid_tri/sh_grid_tri.fsh_mod | 1 + shaders/sh_grid_tri/sh_grid_tri.vsh_mod | 1 + .../sh_herringbone_tile.fsh_mod | 1 + .../sh_herringbone_tile.vsh_mod | 1 + shaders/sh_high_pass/sh_high_pass.fsh | 35 +- shaders/sh_high_pass/sh_high_pass.fsh_mod | 1 + shaders/sh_high_pass/sh_high_pass.vsh_mod | 1 + shaders/sh_image_trace/sh_image_trace.fsh_mod | 1 + shaders/sh_image_trace/sh_image_trace.vsh_mod | 1 + shaders/sh_interlaced/sh_interlaced.fsh_mod | 1 + shaders/sh_interlaced/sh_interlaced.vsh_mod | 1 + .../sh_interpret_number.fsh_mod | 1 + .../sh_interpret_number.vsh_mod | 1 + shaders/sh_invert/sh_invert.fsh_mod | 1 + shaders/sh_invert/sh_invert.vsh_mod | 1 + shaders/sh_jpeg_dct/sh_jpeg_dct.fsh_mod | 1 + shaders/sh_jpeg_dct/sh_jpeg_dct.vsh_mod | 1 + shaders/sh_jpeg_recons/sh_jpeg_recons.fsh_mod | 1 + shaders/sh_jpeg_recons/sh_jpeg_recons.vsh_mod | 1 + shaders/sh_kuwahara/sh_kuwahara.fsh_mod | 1 + shaders/sh_kuwahara/sh_kuwahara.vsh_mod | 1 + .../sh_kuwahara_ani/sh_kuwahara_ani.fsh_mod | 1 + .../sh_kuwahara_ani/sh_kuwahara_ani.vsh_mod | 1 + shaders/sh_level/sh_level.fsh_mod | 1 + shaders/sh_level/sh_level.vsh_mod | 1 + .../sh_level_selector.fsh_mod | 1 + .../sh_level_selector.vsh_mod | 1 + shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh | 164 +++--- .../sh_liquefy_bloat/sh_liquefy_bloat.fsh_mod | 1 + .../sh_liquefy_bloat/sh_liquefy_bloat.vsh_mod | 1 + shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh | 164 +++--- .../sh_liquefy_pinch/sh_liquefy_pinch.fsh_mod | 1 + .../sh_liquefy_pinch/sh_liquefy_pinch.vsh_mod | 1 + shaders/sh_liquefy_push/sh_liquefy_push.fsh | 164 +++--- .../sh_liquefy_push/sh_liquefy_push.fsh_mod | 1 + .../sh_liquefy_push/sh_liquefy_push.vsh_mod | 1 + shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh | 164 +++--- .../sh_liquefy_twirl/sh_liquefy_twirl.fsh_mod | 1 + .../sh_liquefy_twirl/sh_liquefy_twirl.vsh_mod | 1 + shaders/sh_local_analyze/sh_local_analyze.fsh | 46 +- .../sh_local_analyze/sh_local_analyze.fsh_mod | 1 + .../sh_local_analyze/sh_local_analyze.vsh_mod | 1 + shaders/sh_lovify/sh_lovify.fsh_mod | 1 + shaders/sh_lovify/sh_lovify.vsh_mod | 1 + shaders/sh_lum2alpha/sh_lum2alpha.fsh_mod | 1 + shaders/sh_lum2alpha/sh_lum2alpha.vsh_mod | 1 + shaders/sh_mask/sh_mask.fsh_mod | 1 + shaders/sh_mask/sh_mask.vsh_mod | 1 + shaders/sh_mask_expand/sh_mask_expand.fsh_mod | 1 + shaders/sh_mask_expand/sh_mask_expand.vsh_mod | 1 + shaders/sh_mask_invert/sh_mask_invert.fsh_mod | 1 + shaders/sh_mask_invert/sh_mask_invert.vsh_mod | 1 + shaders/sh_mask_modify/sh_mask_modify.fsh_mod | 1 + shaders/sh_mask_modify/sh_mask_modify.vsh_mod | 1 + .../sh_mesh_generation.fsh_mod | 1 + .../sh_mesh_generation.vsh_mod | 1 + shaders/sh_mirror/sh_mirror.fsh_mod | 1 + shaders/sh_mirror/sh_mirror.vsh_mod | 1 + shaders/sh_mirror_mask/sh_mirror_mask.fsh_mod | 1 + shaders/sh_mirror_mask/sh_mirror_mask.vsh_mod | 1 + shaders/sh_mk_ballGrid/sh_mk_ballGrid.fsh_mod | 1 + shaders/sh_mk_ballGrid/sh_mk_ballGrid.vsh_mod | 1 + shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh_mod | 1 + shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh_mod | 1 + .../sh_mk_flag_shade/sh_mk_flag_shade.fsh_mod | 1 + .../sh_mk_flag_shade/sh_mk_flag_shade.vsh_mod | 1 + shaders/sh_mk_flipGrid/sh_mk_flipGrid.fsh_mod | 1 + shaders/sh_mk_flipGrid/sh_mk_flipGrid.vsh_mod | 1 + shaders/sh_mk_fracture/sh_mk_fracture.fsh_mod | 1 + shaders/sh_mk_fracture/sh_mk_fracture.vsh_mod | 1 + .../sh_mk_saber_glow/sh_mk_saber_glow.fsh_mod | 1 + .../sh_mk_saber_glow/sh_mk_saber_glow.vsh_mod | 1 + .../sh_mk_subpixel_chevron.fsh_mod | 1 + .../sh_mk_subpixel_chevron.vsh_mod | 1 + .../sh_mk_subpixel_diagonal.fsh_mod | 1 + .../sh_mk_subpixel_diagonal.vsh_mod | 1 + .../sh_mk_subpixel_hex_disc.fsh_mod | 1 + .../sh_mk_subpixel_hex_disc.vsh_mod | 1 + .../sh_mk_subpixel_linear.fsh_mod | 1 + .../sh_mk_subpixel_linear.vsh_mod | 1 + .../sh_mk_subpixel_linear_block.fsh_mod | 1 + .../sh_mk_subpixel_linear_block.vsh_mod | 1 + ...sh_mk_subpixel_linear_block_offset.fsh_mod | 1 + ...sh_mk_subpixel_linear_block_offset.vsh_mod | 1 + .../sh_mk_subpixel_square.fsh_mod | 1 + .../sh_mk_subpixel_square.vsh_mod | 1 + .../sh_mk_subpixel_square_non.fsh_mod | 1 + .../sh_mk_subpixel_square_non.vsh_mod | 1 + .../sh_mk_tile18_edge_b.fsh_mod | 1 + .../sh_mk_tile18_edge_b.vsh_mod | 1 + .../sh_mk_tile18_edge_l.fsh_mod | 1 + .../sh_mk_tile18_edge_l.vsh_mod | 1 + .../sh_mk_tile18_edge_r.fsh_mod | 1 + .../sh_mk_tile18_edge_r.vsh_mod | 1 + .../sh_mk_tile18_edge_t.fsh_mod | 1 + .../sh_mk_tile18_edge_t.vsh_mod | 1 + .../sh_mk_tile55_edge_b.fsh_mod | 1 + .../sh_mk_tile55_edge_b.vsh_mod | 1 + .../sh_mk_tile55_edge_l.fsh_mod | 1 + .../sh_mk_tile55_edge_l.vsh_mod | 1 + .../sh_mk_tile55_edge_r.fsh_mod | 1 + .../sh_mk_tile55_edge_r.vsh_mod | 1 + .../sh_mk_tile55_edge_t.fsh_mod | 1 + .../sh_mk_tile55_edge_t.vsh_mod | 1 + shaders/sh_morph_surface/sh_morph_surface.fsh | 167 +++--- .../sh_morph_surface/sh_morph_surface.fsh_mod | 1 + .../sh_morph_surface/sh_morph_surface.vsh_mod | 1 + shaders/sh_node_arc/sh_node_arc.fsh_mod | 1 + shaders/sh_node_arc/sh_node_arc.vsh_mod | 1 + shaders/sh_node_circle/sh_node_circle.fsh_mod | 1 + shaders/sh_node_circle/sh_node_circle.vsh_mod | 1 + .../sh_node_widget_rotator.fsh_mod | 1 + .../sh_node_widget_rotator.vsh_mod | 1 + .../sh_node_widget_scalar.fsh_mod | 1 + .../sh_node_widget_scalar.vsh_mod | 1 + .../sh_node_widget_scalar_cross.fsh_mod | 1 + .../sh_node_widget_scalar_cross.vsh_mod | 1 + .../sh_node_widget_scalar_line.fsh_mod | 1 + .../sh_node_widget_scalar_line.vsh_mod | 1 + shaders/sh_noise/sh_noise.fsh_mod | 1 + shaders/sh_noise/sh_noise.vsh_mod | 1 + .../sh_noise_bubble/sh_noise_bubble.fsh_mod | 1 + .../sh_noise_bubble/sh_noise_bubble.vsh_mod | 1 + .../sh_noise_cristal/sh_noise_cristal.fsh_mod | 1 + .../sh_noise_cristal/sh_noise_cristal.vsh_mod | 1 + shaders/sh_noise_fbm/sh_noise_fbm.fsh_mod | 1 + shaders/sh_noise_fbm/sh_noise_fbm.vsh_mod | 1 + shaders/sh_noise_flow/sh_noise_flow.fsh_mod | 1 + shaders/sh_noise_flow/sh_noise_flow.vsh_mod | 1 + shaders/sh_noise_fold/sh_noise_fold.fsh_mod | 1 + shaders/sh_noise_fold/sh_noise_fold.vsh_mod | 1 + shaders/sh_noise_gabor/sh_noise_gabor.fsh_mod | 1 + shaders/sh_noise_gabor/sh_noise_gabor.vsh_mod | 1 + .../sh_noise_grid_hex/sh_noise_grid_hex.fsh | 43 +- .../sh_noise_grid_hex.fsh_mod | 1 + .../sh_noise_grid_hex.vsh_mod | 1 + .../sh_noise_grid_tri/sh_noise_grid_tri.fsh | 43 +- .../sh_noise_grid_tri.fsh_mod | 1 + .../sh_noise_grid_tri.vsh_mod | 1 + shaders/sh_noise_honey/sh_noise_honey.fsh_mod | 1 + shaders/sh_noise_honey/sh_noise_honey.vsh_mod | 1 + shaders/sh_noise_shard/sh_noise_shard.fsh_mod | 1 + shaders/sh_noise_shard/sh_noise_shard.vsh_mod | 1 + .../sh_noise_strand/sh_noise_strand.fsh_mod | 1 + .../sh_noise_strand/sh_noise_strand.vsh_mod | 1 + .../sh_noise_wavelet/sh_noise_wavelet.fsh_mod | 1 + .../sh_noise_wavelet/sh_noise_wavelet.vsh_mod | 1 + shaders/sh_normal/sh_normal.fsh_mod | 1 + shaders/sh_normal/sh_normal.vsh_mod | 1 + .../sh_normal_light/sh_normal_light.fsh_mod | 1 + .../sh_normal_light/sh_normal_light.vsh_mod | 1 + .../sh_normal_light_apply.fsh_mod | 1 + .../sh_normal_light_apply.vsh_mod | 1 + shaders/sh_normalize/sh_normalize.fsh_mod | 1 + shaders/sh_normalize/sh_normalize.vsh_mod | 1 + shaders/sh_offset/sh_offset.fsh_mod | 1 + shaders/sh_offset/sh_offset.vsh_mod | 1 + shaders/sh_outline/sh_outline.fsh | 42 +- shaders/sh_outline/sh_outline.fsh_mod | 1 + shaders/sh_outline/sh_outline.vsh_mod | 1 + .../sh_outline_only/sh_outline_only.fsh_mod | 1 + .../sh_outline_only/sh_outline_only.vsh_mod | 1 + .../sh_override_channel.fsh_mod | 1 + .../sh_override_channel.vsh_mod | 1 + ...h_palette_mixer_atlas_expand_apply.fsh_mod | 1 + ...h_palette_mixer_atlas_expand_apply.vsh_mod | 1 + ...h_palette_mixer_atlas_expand_coord.fsh_mod | 1 + ...h_palette_mixer_atlas_expand_coord.vsh_mod | 1 + ...palette_mixer_atlas_expand_iterate.fsh_mod | 1 + ...palette_mixer_atlas_expand_iterate.vsh_mod | 1 + ...palette_mixer_atlas_expand_palette.fsh_mod | 1 + ...palette_mixer_atlas_expand_palette.vsh_mod | 1 + .../sh_palette_replace.fsh_mod | 1 + .../sh_palette_replace.vsh_mod | 1 + .../sh_palette_shift/sh_palette_shift.fsh_mod | 1 + .../sh_palette_shift/sh_palette_shift.vsh_mod | 1 + .../sh_path_fill_profile.fsh_mod | 1 + .../sh_path_fill_profile.vsh_mod | 1 + shaders/sh_pb_blob/sh_pb_blob.fsh_mod | 1 + shaders/sh_pb_blob/sh_pb_blob.vsh_mod | 1 + shaders/sh_pb_brick/sh_pb_brick.fsh_mod | 1 + shaders/sh_pb_brick/sh_pb_brick.vsh_mod | 1 + .../sh_pb_draw_mask/sh_pb_draw_mask.fsh_mod | 1 + .../sh_pb_draw_mask/sh_pb_draw_mask.vsh_mod | 1 + shaders/sh_pb_hash/sh_pb_hash.fsh_mod | 1 + shaders/sh_pb_hash/sh_pb_hash.vsh_mod | 1 + .../sh_pb_highlight/sh_pb_highlight.fsh_mod | 1 + .../sh_pb_highlight/sh_pb_highlight.vsh_mod | 1 + .../sh_pb_mask_inset/sh_pb_mask_inset.fsh_mod | 1 + .../sh_pb_mask_inset/sh_pb_mask_inset.vsh_mod | 1 + shaders/sh_pb_outline/sh_pb_outline.fsh_mod | 1 + shaders/sh_pb_outline/sh_pb_outline.vsh_mod | 1 + shaders/sh_pb_shade/sh_pb_shade.fsh_mod | 1 + shaders/sh_pb_shade/sh_pb_shade.vsh_mod | 1 + .../sh_pb_shade_half/sh_pb_shade_half.fsh_mod | 1 + .../sh_pb_shade_half/sh_pb_shade_half.vsh_mod | 1 + shaders/sh_pb_strip/sh_pb_strip.fsh_mod | 1 + shaders/sh_pb_strip/sh_pb_strip.vsh_mod | 1 + shaders/sh_pb_to_mask/sh_pb_to_mask.fsh_mod | 1 + shaders/sh_pb_to_mask/sh_pb_to_mask.vsh_mod | 1 + shaders/sh_perlin/sh_perlin.fsh_mod | 1 + shaders/sh_perlin/sh_perlin.vsh_mod | 1 + .../sh_perlin_extra/sh_perlin_extra.fsh_mod | 1 + .../sh_perlin_extra/sh_perlin_extra.vsh_mod | 1 + .../sh_perlin_smear/sh_perlin_smear.fsh_mod | 1 + .../sh_perlin_smear/sh_perlin_smear.vsh_mod | 1 + .../sh_perlin_tiled/sh_perlin_tiled.fsh_mod | 1 + .../sh_perlin_tiled/sh_perlin_tiled.vsh_mod | 1 + shaders/sh_pixel_cloud/sh_pixel_cloud.fsh_mod | 1 + shaders/sh_pixel_cloud/sh_pixel_cloud.vsh_mod | 1 + shaders/sh_pixel_math/sh_pixel_math.fsh_mod | 1 + shaders/sh_pixel_math/sh_pixel_math.vsh_mod | 1 + .../sh_pixel_sample/sh_pixel_sample.fsh_mod | 1 + .../sh_pixel_sample/sh_pixel_sample.vsh_mod | 1 + shaders/sh_pixel_sort/sh_pixel_sort.fsh_mod | 1 + shaders/sh_pixel_sort/sh_pixel_sort.vsh_mod | 1 + shaders/sh_polar/sh_polar.fsh | 167 +++--- shaders/sh_polar/sh_polar.fsh_mod | 1 + shaders/sh_polar/sh_polar.vsh_mod | 1 + shaders/sh_posterize/sh_posterize.fsh_mod | 1 + shaders/sh_posterize/sh_posterize.vsh_mod | 1 + .../sh_posterize_palette.fsh_mod | 1 + .../sh_posterize_palette.vsh_mod | 1 + .../sh_preview_histogram.fsh_mod | 1 + .../sh_preview_histogram.vsh_mod | 1 + .../sh_preview_histogram_outline.fsh_mod | 1 + .../sh_preview_histogram_outline.vsh_mod | 1 + .../sh_pytagorean_tile.fsh_mod | 1 + .../sh_pytagorean_tile.vsh_mod | 1 + .../sh_quarsicrystal/sh_quarsicrystal.fsh_mod | 1 + .../sh_quarsicrystal/sh_quarsicrystal.vsh_mod | 1 + shaders/sh_random_tile/sh_random_tile.fsh_mod | 1 + shaders/sh_random_tile/sh_random_tile.vsh_mod | 1 + shaders/sh_rd_add/sh_rd_add.fsh_mod | 1 + shaders/sh_rd_add/sh_rd_add.vsh_mod | 1 + shaders/sh_rd_convert/sh_rd_convert.fsh_mod | 1 + shaders/sh_rd_convert/sh_rd_convert.vsh_mod | 1 + .../sh_rd_propagate/sh_rd_propagate.fsh_mod | 1 + .../sh_rd_propagate/sh_rd_propagate.vsh_mod | 1 + shaders/sh_rd_render/sh_rd_render.fsh_mod | 1 + shaders/sh_rd_render/sh_rd_render.vsh_mod | 1 + .../sh_region_fill_border.fsh_mod | 1 + .../sh_region_fill_border.vsh_mod | 1 + .../sh_region_fill_color.fsh_mod | 1 + .../sh_region_fill_color.vsh_mod | 1 + .../sh_region_fill_coordinate.fsh_mod | 1 + .../sh_region_fill_coordinate.vsh_mod | 1 + .../sh_region_fill_coordinate_all.fsh_mod | 1 + .../sh_region_fill_coordinate_all.vsh_mod | 1 + ...sh_region_fill_coordinate_all_init.fsh_mod | 1 + ...sh_region_fill_coordinate_all_init.vsh_mod | 1 + .../sh_region_fill_coordinate_init.fsh_mod | 1 + .../sh_region_fill_coordinate_init.vsh_mod | 1 + .../sh_region_fill_init.fsh_mod | 1 + .../sh_region_fill_init.vsh_mod | 1 + .../sh_region_fill_inner.fsh_mod | 1 + .../sh_region_fill_inner.vsh_mod | 1 + .../sh_region_fill_inner_remove.fsh_mod | 1 + .../sh_region_fill_inner_remove.vsh_mod | 1 + .../sh_region_fill_map.fsh_mod | 1 + .../sh_region_fill_map.vsh_mod | 1 + .../sh_region_fill_rg_coord.fsh_mod | 1 + .../sh_region_fill_rg_coord.vsh_mod | 1 + .../sh_region_fill_rg_index.fsh_mod | 1 + .../sh_region_fill_rg_index.vsh_mod | 1 + .../sh_region_fill_rg_map.fsh_mod | 1 + .../sh_region_fill_rg_map.vsh_mod | 1 + .../sh_remove_black/sh_remove_black.fsh_mod | 1 + .../sh_remove_black/sh_remove_black.vsh_mod | 1 + .../sh_replace_color/sh_replace_color.fsh_mod | 1 + .../sh_replace_color/sh_replace_color.vsh_mod | 1 + shaders/sh_rim/sh_rim.fsh_mod | 1 + shaders/sh_rim/sh_rim.vsh_mod | 1 + shaders/sh_rm_cloud/sh_rm_cloud.fsh_mod | 1 + shaders/sh_rm_cloud/sh_rm_cloud.vsh_mod | 1 + .../sh_rm_primitive/sh_rm_primitive.fsh_mod | 1 + .../sh_rm_primitive/sh_rm_primitive.vsh_mod | 1 + shaders/sh_rm_terrain/sh_rm_terrain.fsh_mod | 1 + shaders/sh_rm_terrain/sh_rm_terrain.vsh_mod | 1 + shaders/sh_rsh_corner/sh_rsh_corner.fsh_mod | 1 + shaders/sh_rsh_corner/sh_rsh_corner.vsh_mod | 1 + shaders/sh_rsh_erode/sh_rsh_erode.fsh_mod | 1 + shaders/sh_rsh_erode/sh_rsh_erode.vsh_mod | 1 + shaders/sh_rsh_rotate/sh_rsh_rotate.fsh_mod | 1 + shaders/sh_rsh_rotate/sh_rsh_rotate.vsh_mod | 1 + shaders/sh_sample/sh_sample.fsh | 144 ++--- shaders/sh_sample/sh_sample.fsh_mod | 1 + shaders/sh_sample/sh_sample.vsh_mod | 1 + .../sh_sample_points/sh_sample_points.fsh_mod | 1 + .../sh_sample_points/sh_sample_points.vsh_mod | 1 + shaders/sh_sao/sh_sao.fsh_mod | 1 + shaders/sh_sao/sh_sao.vsh_mod | 1 + shaders/sh_scale2x/sh_scale2x.fsh_mod | 1 + shaders/sh_scale2x/sh_scale2x.vsh_mod | 1 + shaders/sh_scale3x/sh_scale3x.fsh_mod | 1 + shaders/sh_scale3x/sh_scale3x.vsh_mod | 1 + .../sh_scale_cleanedge.fsh_mod | 1 + .../sh_scale_cleanedge.vsh_mod | 1 + shaders/sh_sdf/sh_sdf.fsh_mod | 1 + shaders/sh_sdf/sh_sdf.vsh_mod | 1 + shaders/sh_sdf_dist/sh_sdf_dist.fsh_mod | 1 + shaders/sh_sdf_dist/sh_sdf_dist.vsh_mod | 1 + shaders/sh_sdf_tex/sh_sdf_tex.fsh_mod | 1 + shaders/sh_sdf_tex/sh_sdf_tex.vsh_mod | 1 + .../sh_seperate_shape_counter.fsh_mod | 1 + .../sh_seperate_shape_counter.vsh_mod | 1 + .../sh_seperate_shape_index.fsh_mod | 1 + .../sh_seperate_shape_index.vsh_mod | 1 + .../sh_seperate_shape_ite.fsh_mod | 1 + .../sh_seperate_shape_ite.vsh_mod | 1 + .../sh_seperate_shape_sep.fsh_mod | 1 + .../sh_seperate_shape_sep.vsh_mod | 1 + shaders/sh_shadow_cast/sh_shadow_cast.fsh_mod | 1 + shaders/sh_shadow_cast/sh_shadow_cast.vsh_mod | 1 + .../sh_shadow_cast_light_sep.fsh_mod | 1 + .../sh_shadow_cast_light_sep.vsh_mod | 1 + shaders/sh_shape/sh_shape.fsh_mod | 1 + shaders/sh_shape/sh_shape.vsh_mod | 1 + .../sh_shape_map_circle.fsh | 163 +++--- .../sh_shape_map_circle.fsh_mod | 1 + .../sh_shape_map_circle.vsh_mod | 1 + .../sh_shape_map_polygon.fsh | 163 +++--- .../sh_shape_map_polygon.fsh_mod | 1 + .../sh_shape_map_polygon.vsh_mod | 1 + shaders/sh_simplex/sh_simplex.fsh_mod | 1 + shaders/sh_simplex/sh_simplex.vsh_mod | 1 + shaders/sh_skew/sh_skew.fsh | 189 ++++--- shaders/sh_skew/sh_skew.fsh_mod | 1 + shaders/sh_skew/sh_skew.vsh_mod | 1 + shaders/sh_sky_hosek/sh_sky_hosek.fsh_mod | 1 + shaders/sh_sky_hosek/sh_sky_hosek.vsh_mod | 1 + .../sh_sky_preetham/sh_sky_preetham.fsh_mod | 1 + .../sh_sky_preetham/sh_sky_preetham.vsh_mod | 1 + .../sh_sky_scattering.fsh_mod | 1 + .../sh_sky_scattering.vsh_mod | 1 + .../sh_slice_spritesheet_empty_scan.fsh_mod | 1 + .../sh_slice_spritesheet_empty_scan.vsh_mod | 1 + shaders/sh_smear/sh_smear.fsh | 46 +- shaders/sh_smear/sh_smear.fsh_mod | 1 + shaders/sh_smear/sh_smear.vsh_mod | 1 + shaders/sh_solid/sh_solid.fsh_mod | 1 + shaders/sh_solid/sh_solid.vsh_mod | 1 + shaders/sh_spherize/sh_spherize.fsh | 189 ++++--- shaders/sh_spherize/sh_spherize.fsh_mod | 1 + shaders/sh_spherize/sh_spherize.vsh_mod | 1 + shaders/sh_stripe/sh_stripe.fsh_mod | 1 + shaders/sh_stripe/sh_stripe.vsh_mod | 1 + .../sh_surface_replace_fast_find.fsh_mod | 1 + .../sh_surface_replace_fast_find.vsh_mod | 1 + .../sh_surface_replace_fast_replace.fsh_mod | 1 + .../sh_surface_replace_fast_replace.vsh_mod | 1 + .../sh_surface_replace_find.fsh_mod | 1 + .../sh_surface_replace_find.vsh_mod | 1 + .../sh_surface_replace_replace.fsh_mod | 1 + .../sh_surface_replace_replace.vsh_mod | 1 + .../sh_svg_curve_quad.fsh_mod | 1 + .../sh_svg_curve_quad.vsh_mod | 1 + shaders/sh_svg_fill/sh_svg_fill.fsh_mod | 1 + shaders/sh_svg_fill/sh_svg_fill.vsh_mod | 1 + .../sh_texture_atlas/sh_texture_atlas.fsh_mod | 1 + .../sh_texture_atlas/sh_texture_atlas.vsh_mod | 1 + shaders/sh_texture_remap/sh_texture_remap.fsh | 143 ++--- .../sh_texture_remap/sh_texture_remap.fsh_mod | 1 + .../sh_texture_remap/sh_texture_remap.vsh_mod | 1 + .../sh_texture_repeat.fsh_mod | 1 + .../sh_texture_repeat.vsh_mod | 1 + shaders/sh_threshold/sh_threshold.fsh_mod | 1 + shaders/sh_threshold/sh_threshold.vsh_mod | 1 + shaders/sh_tile_random/sh_tile_random.fsh_mod | 1 + shaders/sh_tile_random/sh_tile_random.vsh_mod | 1 + .../sh_tiler_autotile_apply.fsh | 63 ++- .../sh_tiler_autotile_apply.fsh_mod | 1 + .../sh_tiler_autotile_apply.vsh_mod | 1 + .../sh_tiler_autotile_mask.fsh_mod | 1 + .../sh_tiler_autotile_mask.vsh_mod | 1 + shaders/sh_time_remap/sh_time_remap.fsh_mod | 1 + shaders/sh_time_remap/sh_time_remap.vsh_mod | 1 + .../sh_trail_filler/sh_trail_filler.fsh_mod | 1 + .../sh_trail_filler/sh_trail_filler.vsh_mod | 1 + .../sh_trail_filler_pass1.fsh_mod | 1 + .../sh_trail_filler_pass1.vsh_mod | 1 + .../sh_trail_filler_pass2.fsh_mod | 1 + .../sh_trail_filler_pass2.vsh_mod | 1 + .../sh_trans_node_prev_drop.fsh_mod | 1 + .../sh_trans_node_prev_drop.vsh_mod | 1 + shaders/sh_twirl/sh_twirl.fsh | 201 ++++--- shaders/sh_twirl/sh_twirl.fsh_bak | 131 +++++ shaders/sh_twirl/sh_twirl.fsh_mod | 197 +++++++ shaders/sh_twirl/sh_twirl.vsh_mod | 1 + shaders/sh_ui_rotator/sh_ui_rotator.fsh_mod | 1 + shaders/sh_ui_rotator/sh_ui_rotator.vsh_mod | 1 + .../sh_ui_shape_circle.fsh_mod | 1 + .../sh_ui_shape_circle.vsh_mod | 1 + shaders/sh_ui_slider/sh_ui_slider.fsh_mod | 1 + shaders/sh_ui_slider/sh_ui_slider.vsh_mod | 1 + .../sh_vector_diverge.fsh_mod | 1 + .../sh_vector_diverge.vsh_mod | 1 + .../sh_vertex_depth_pass.fsh_mod | 1 + .../sh_vertex_depth_pass.vsh_mod | 1 + .../sh_vertex_normal_pass.fsh_mod | 1 + .../sh_vertex_normal_pass.vsh_mod | 1 + .../sh_vertex_pnt_light.fsh_mod | 1 + .../sh_vertex_pnt_light.vsh_mod | 1 + shaders/sh_vertex_pt/sh_vertex_pt.fsh_mod | 1 + shaders/sh_vertex_pt/sh_vertex_pt.vsh_mod | 1 + shaders/sh_vignette/sh_vignette.fsh_mod | 1 + shaders/sh_vignette/sh_vignette.vsh_mod | 1 + .../sh_voronoi_extra/sh_voronoi_extra.fsh_mod | 1 + .../sh_voronoi_extra/sh_voronoi_extra.vsh_mod | 1 + shaders/sh_warp_4points/sh_warp_4points.fsh | 164 +++--- .../sh_warp_4points/sh_warp_4points.fsh_mod | 1 + .../sh_warp_4points/sh_warp_4points.vsh_mod | 1 + .../sh_warp_4points_pers.fsh | 167 +++--- .../sh_warp_4points_pers.fsh_mod | 1 + .../sh_warp_4points_pers.vsh_mod | 1 + .../sh_water_caustic/sh_water_caustic.fsh_mod | 1 + .../sh_water_caustic/sh_water_caustic.vsh_mod | 1 + .../sh_widget_rotator.fsh_mod | 1 + .../sh_widget_rotator.vsh_mod | 1 + .../sh_widget_rotator_range.fsh_mod | 1 + .../sh_widget_rotator_range.vsh_mod | 1 + shaders/sh_zigzag/sh_zigzag.fsh_mod | 1 + shaders/sh_zigzag/sh_zigzag.vsh_mod | 1 + 916 files changed, 4256 insertions(+), 2293 deletions(-) create mode 100644 datafiles/Shaders/sampler.glsl create mode 100644 datafiles/Shaders/sampler_simple.glsl create mode 100644 datafiles/Shaders/shader_replace.py create mode 100644 pre_build_step.bat create mode 100644 shaders/sh_2d_light/sh_2d_light.fsh_mod create mode 100644 shaders/sh_2d_light/sh_2d_light.vsh_mod create mode 100644 shaders/sh_3d_depth/sh_3d_depth.fsh_mod create mode 100644 shaders/sh_3d_depth/sh_3d_depth.vsh_mod create mode 100644 shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.fsh_mod create mode 100644 shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.vsh_mod create mode 100644 shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.fsh_mod create mode 100644 shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.vsh_mod create mode 100644 shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.fsh_mod create mode 100644 shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.vsh_mod create mode 100644 shaders/sh_BGR/sh_BGR.fsh_mod create mode 100644 shaders/sh_BGR/sh_BGR.vsh_mod create mode 100644 shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.fsh_mod create mode 100644 shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.vsh_mod create mode 100644 shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.fsh_mod create mode 100644 shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.vsh_mod create mode 100644 shaders/sh_FXAA/sh_FXAA.fsh_mod create mode 100644 shaders/sh_FXAA/sh_FXAA.vsh_mod create mode 100644 shaders/sh_ace/sh_ace.fsh_mod create mode 100644 shaders/sh_ace/sh_ace.vsh_mod create mode 100644 shaders/sh_active_canvas_ink/sh_active_canvas_ink.fsh_mod create mode 100644 shaders/sh_active_canvas_ink/sh_active_canvas_ink.vsh_mod create mode 100644 shaders/sh_alpha_cutoff/sh_alpha_cutoff.fsh_mod create mode 100644 shaders/sh_alpha_cutoff/sh_alpha_cutoff.vsh_mod create mode 100644 shaders/sh_alpha_grey/sh_alpha_grey.fsh_mod create mode 100644 shaders/sh_alpha_grey/sh_alpha_grey.vsh_mod create mode 100644 shaders/sh_alpha_hash/sh_alpha_hash.fsh_mod create mode 100644 shaders/sh_alpha_hash/sh_alpha_hash.vsh_mod create mode 100644 shaders/sh_ani_noise/sh_ani_noise.fsh_mod create mode 100644 shaders/sh_ani_noise/sh_ani_noise.vsh_mod create mode 100644 shaders/sh_atlas/sh_atlas.fsh_mod create mode 100644 shaders/sh_atlas/sh_atlas.vsh_mod create mode 100644 shaders/sh_atlas_scan/sh_atlas_scan.fsh_mod create mode 100644 shaders/sh_atlas_scan/sh_atlas_scan.vsh_mod create mode 100644 shaders/sh_average/sh_average.fsh_mod create mode 100644 shaders/sh_average/sh_average.vsh_mod create mode 100644 shaders/sh_bend_arc/sh_bend_arc.fsh_mod create mode 100644 shaders/sh_bend_arc/sh_bend_arc.vsh_mod create mode 100644 shaders/sh_bevel/sh_bevel.fsh_mod create mode 100644 shaders/sh_bevel/sh_bevel.vsh_mod create mode 100644 shaders/sh_bevel_highp/sh_bevel_highp.fsh_mod create mode 100644 shaders/sh_bevel_highp/sh_bevel_highp.vsh_mod create mode 100644 shaders/sh_blend_add/sh_blend_add.fsh_mod create mode 100644 shaders/sh_blend_add/sh_blend_add.vsh_mod create mode 100644 shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.fsh_mod create mode 100644 shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.vsh_mod create mode 100644 shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.fsh_mod create mode 100644 shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.vsh_mod create mode 100644 shaders/sh_blend_color_burn/sh_blend_color_burn.fsh_mod create mode 100644 shaders/sh_blend_color_burn/sh_blend_color_burn.vsh_mod create mode 100644 shaders/sh_blend_color_dodge/sh_blend_color_dodge.fsh_mod create mode 100644 shaders/sh_blend_color_dodge/sh_blend_color_dodge.vsh_mod create mode 100644 shaders/sh_blend_contrast/sh_blend_contrast.fsh_mod create mode 100644 shaders/sh_blend_contrast/sh_blend_contrast.vsh_mod create mode 100644 shaders/sh_blend_difference/sh_blend_difference.fsh_mod create mode 100644 shaders/sh_blend_difference/sh_blend_difference.vsh_mod create mode 100644 shaders/sh_blend_divide/sh_blend_divide.fsh_mod create mode 100644 shaders/sh_blend_divide/sh_blend_divide.vsh_mod create mode 100644 shaders/sh_blend_edge/sh_blend_edge.fsh_mod create mode 100644 shaders/sh_blend_edge/sh_blend_edge.vsh_mod create mode 100644 shaders/sh_blend_edge_blend/sh_blend_edge_blend.fsh_mod create mode 100644 shaders/sh_blend_edge_blend/sh_blend_edge_blend.vsh_mod create mode 100644 shaders/sh_blend_edge_extract/sh_blend_edge_extract.fsh_mod create mode 100644 shaders/sh_blend_edge_extract/sh_blend_edge_extract.vsh_mod create mode 100644 shaders/sh_blend_exclusion/sh_blend_exclusion.fsh_mod create mode 100644 shaders/sh_blend_exclusion/sh_blend_exclusion.vsh_mod create mode 100644 shaders/sh_blend_hard_light/sh_blend_hard_light.fsh_mod create mode 100644 shaders/sh_blend_hard_light/sh_blend_hard_light.vsh_mod create mode 100644 shaders/sh_blend_hue/sh_blend_hue.fsh_mod create mode 100644 shaders/sh_blend_hue/sh_blend_hue.vsh_mod create mode 100644 shaders/sh_blend_linear_burn/sh_blend_linear_burn.fsh_mod create mode 100644 shaders/sh_blend_linear_burn/sh_blend_linear_burn.vsh_mod create mode 100644 shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.fsh_mod create mode 100644 shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.vsh_mod create mode 100644 shaders/sh_blend_linear_light/sh_blend_linear_light.fsh_mod create mode 100644 shaders/sh_blend_linear_light/sh_blend_linear_light.vsh_mod create mode 100644 shaders/sh_blend_luma/sh_blend_luma.fsh_mod create mode 100644 shaders/sh_blend_luma/sh_blend_luma.vsh_mod create mode 100644 shaders/sh_blend_max/sh_blend_max.fsh_mod create mode 100644 shaders/sh_blend_max/sh_blend_max.vsh_mod create mode 100644 shaders/sh_blend_min/sh_blend_min.fsh_mod create mode 100644 shaders/sh_blend_min/sh_blend_min.vsh_mod create mode 100644 shaders/sh_blend_multiply/sh_blend_multiply.fsh_mod create mode 100644 shaders/sh_blend_multiply/sh_blend_multiply.vsh_mod create mode 100644 shaders/sh_blend_normal/sh_blend_normal.fsh_mod create mode 100644 shaders/sh_blend_normal/sh_blend_normal.vsh_mod create mode 100644 shaders/sh_blend_normal_dim/sh_blend_normal_dim.fsh_mod create mode 100644 shaders/sh_blend_normal_dim/sh_blend_normal_dim.vsh_mod create mode 100644 shaders/sh_blend_overlay/sh_blend_overlay.fsh_mod create mode 100644 shaders/sh_blend_overlay/sh_blend_overlay.vsh_mod create mode 100644 shaders/sh_blend_pin_light/sh_blend_pin_light.fsh_mod create mode 100644 shaders/sh_blend_pin_light/sh_blend_pin_light.vsh_mod create mode 100644 shaders/sh_blend_replace/sh_blend_replace.fsh_mod create mode 100644 shaders/sh_blend_replace/sh_blend_replace.vsh_mod create mode 100644 shaders/sh_blend_sat/sh_blend_sat.fsh_mod create mode 100644 shaders/sh_blend_sat/sh_blend_sat.vsh_mod create mode 100644 shaders/sh_blend_screen/sh_blend_screen.fsh_mod create mode 100644 shaders/sh_blend_screen/sh_blend_screen.vsh_mod create mode 100644 shaders/sh_blend_soft_light/sh_blend_soft_light.fsh_mod create mode 100644 shaders/sh_blend_soft_light/sh_blend_soft_light.vsh_mod create mode 100644 shaders/sh_blend_subtract/sh_blend_subtract.fsh_mod create mode 100644 shaders/sh_blend_subtract/sh_blend_subtract.vsh_mod create mode 100644 shaders/sh_blend_vivid_light/sh_blend_vivid_light.fsh_mod create mode 100644 shaders/sh_blend_vivid_light/sh_blend_vivid_light.vsh_mod create mode 100644 shaders/sh_blend_xor/sh_blend_xor.fsh_mod create mode 100644 shaders/sh_blend_xor/sh_blend_xor.vsh_mod create mode 100644 shaders/sh_blink_expand/sh_blink_expand.fsh_mod create mode 100644 shaders/sh_blink_expand/sh_blink_expand.vsh_mod create mode 100644 shaders/sh_blink_extract/sh_blink_extract.fsh_mod create mode 100644 shaders/sh_blink_extract/sh_blink_extract.vsh_mod create mode 100644 shaders/sh_blink_replace/sh_blink_replace.fsh_mod create mode 100644 shaders/sh_blink_replace/sh_blink_replace.vsh_mod create mode 100644 shaders/sh_blobify/sh_blobify.fsh_mod create mode 100644 shaders/sh_blobify/sh_blobify.vsh_mod create mode 100644 shaders/sh_bloom_pass/sh_bloom_pass.fsh_mod create mode 100644 shaders/sh_bloom_pass/sh_bloom_pass.vsh_mod create mode 100644 shaders/sh_blur_alpha/sh_blur_alpha.fsh_mod create mode 100644 shaders/sh_blur_alpha/sh_blur_alpha.vsh_mod create mode 100644 shaders/sh_blur_bokeh/sh_blur_bokeh.fsh_mod create mode 100644 shaders/sh_blur_bokeh/sh_blur_bokeh.vsh_mod create mode 100644 shaders/sh_blur_box_contrast/sh_blur_box_contrast.fsh_mod create mode 100644 shaders/sh_blur_box_contrast/sh_blur_box_contrast.vsh_mod create mode 100644 shaders/sh_blur_directional/sh_blur_directional.fsh_mod create mode 100644 shaders/sh_blur_directional/sh_blur_directional.vsh_mod create mode 100644 shaders/sh_blur_final/sh_blur_final.fsh_mod create mode 100644 shaders/sh_blur_final/sh_blur_final.vsh_mod create mode 100644 shaders/sh_blur_gaussian/sh_blur_gaussian.fsh_mod create mode 100644 shaders/sh_blur_gaussian/sh_blur_gaussian.vsh_mod create mode 100644 shaders/sh_blur_path/sh_blur_path.fsh_mod create mode 100644 shaders/sh_blur_path/sh_blur_path.vsh_mod create mode 100644 shaders/sh_blur_radial/sh_blur_radial.fsh_mod create mode 100644 shaders/sh_blur_radial/sh_blur_radial.vsh_mod create mode 100644 shaders/sh_blur_shape/sh_blur_shape.fsh_mod create mode 100644 shaders/sh_blur_shape/sh_blur_shape.vsh_mod create mode 100644 shaders/sh_blur_simple/sh_blur_simple.fsh_mod create mode 100644 shaders/sh_blur_simple/sh_blur_simple.vsh_mod create mode 100644 shaders/sh_blur_slope/sh_blur_slope.fsh_mod create mode 100644 shaders/sh_blur_slope/sh_blur_slope.vsh_mod create mode 100644 shaders/sh_blur_zoom/sh_blur_zoom.fsh_mod create mode 100644 shaders/sh_blur_zoom/sh_blur_zoom.vsh_mod create mode 100644 shaders/sh_box_pattern/sh_box_pattern.fsh_mod create mode 100644 shaders/sh_box_pattern/sh_box_pattern.vsh_mod create mode 100644 shaders/sh_brush_linear/sh_brush_linear.fsh_mod create mode 100644 shaders/sh_brush_linear/sh_brush_linear.vsh_mod create mode 100644 shaders/sh_brush_outline/sh_brush_outline.fsh_mod create mode 100644 shaders/sh_brush_outline/sh_brush_outline.vsh_mod create mode 100644 shaders/sh_bw/sh_bw.fsh_mod create mode 100644 shaders/sh_bw/sh_bw.vsh_mod create mode 100644 shaders/sh_camera/sh_camera.fsh_mod create mode 100644 shaders/sh_camera/sh_camera.vsh_mod create mode 100644 shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.fsh_mod create mode 100644 shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.vsh_mod create mode 100644 shaders/sh_canvas_corner/sh_canvas_corner.fsh_mod create mode 100644 shaders/sh_canvas_corner/sh_canvas_corner.vsh_mod create mode 100644 shaders/sh_canvas_extrude/sh_canvas_extrude.fsh_mod create mode 100644 shaders/sh_canvas_extrude/sh_canvas_extrude.vsh_mod create mode 100644 shaders/sh_canvas_inset/sh_canvas_inset.fsh_mod create mode 100644 shaders/sh_canvas_inset/sh_canvas_inset.vsh_mod create mode 100644 shaders/sh_canvas_mask/sh_canvas_mask.fsh_mod create mode 100644 shaders/sh_canvas_mask/sh_canvas_mask.vsh_mod create mode 100644 shaders/sh_canvas_skew/sh_canvas_skew.fsh_mod create mode 100644 shaders/sh_canvas_skew/sh_canvas_skew.vsh_mod create mode 100644 shaders/sh_cell_noise/sh_cell_noise.fsh_mod create mode 100644 shaders/sh_cell_noise/sh_cell_noise.vsh_mod create mode 100644 shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh_mod create mode 100644 shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.vsh_mod create mode 100644 shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh_mod create mode 100644 shaders/sh_cell_noise_edge/sh_cell_noise_edge.vsh_mod create mode 100644 shaders/sh_cell_noise_random/sh_cell_noise_random.fsh_mod create mode 100644 shaders/sh_cell_noise_random/sh_cell_noise_random.vsh_mod create mode 100644 shaders/sh_cell_noise_round/sh_cell_noise_round.fsh_mod create mode 100644 shaders/sh_cell_noise_round/sh_cell_noise_round.vsh_mod create mode 100644 shaders/sh_channel_A/sh_channel_A.fsh_mod create mode 100644 shaders/sh_channel_A/sh_channel_A.vsh_mod create mode 100644 shaders/sh_channel_A_grey/sh_channel_A_grey.fsh_mod create mode 100644 shaders/sh_channel_A_grey/sh_channel_A_grey.vsh_mod create mode 100644 shaders/sh_channel_B/sh_channel_B.fsh_mod create mode 100644 shaders/sh_channel_B/sh_channel_B.vsh_mod create mode 100644 shaders/sh_channel_B_grey/sh_channel_B_grey.fsh_mod create mode 100644 shaders/sh_channel_B_grey/sh_channel_B_grey.vsh_mod create mode 100644 shaders/sh_channel_G/sh_channel_G.fsh_mod create mode 100644 shaders/sh_channel_G/sh_channel_G.vsh_mod create mode 100644 shaders/sh_channel_G_grey/sh_channel_G_grey.fsh_mod create mode 100644 shaders/sh_channel_G_grey/sh_channel_G_grey.vsh_mod create mode 100644 shaders/sh_channel_H/sh_channel_H.fsh_mod create mode 100644 shaders/sh_channel_H/sh_channel_H.vsh_mod create mode 100644 shaders/sh_channel_R/sh_channel_R.fsh_mod create mode 100644 shaders/sh_channel_R/sh_channel_R.vsh_mod create mode 100644 shaders/sh_channel_R2A/sh_channel_R2A.fsh_mod create mode 100644 shaders/sh_channel_R2A/sh_channel_R2A.vsh_mod create mode 100644 shaders/sh_channel_R2B/sh_channel_R2B.fsh_mod create mode 100644 shaders/sh_channel_R2B/sh_channel_R2B.vsh_mod create mode 100644 shaders/sh_channel_R2G/sh_channel_R2G.fsh_mod create mode 100644 shaders/sh_channel_R2G/sh_channel_R2G.vsh_mod create mode 100644 shaders/sh_channel_R2R/sh_channel_R2R.fsh_mod create mode 100644 shaders/sh_channel_R2R/sh_channel_R2R.vsh_mod create mode 100644 shaders/sh_channel_R_grey/sh_channel_R_grey.fsh_mod create mode 100644 shaders/sh_channel_R_grey/sh_channel_R_grey.vsh_mod create mode 100644 shaders/sh_channel_S/sh_channel_S.fsh_mod create mode 100644 shaders/sh_channel_S/sh_channel_S.vsh_mod create mode 100644 shaders/sh_channel_V/sh_channel_V.fsh_mod create mode 100644 shaders/sh_channel_V/sh_channel_V.vsh_mod create mode 100644 shaders/sh_checkerboard/sh_checkerboard.fsh_mod create mode 100644 shaders/sh_checkerboard/sh_checkerboard.vsh_mod create mode 100644 shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh_mod create mode 100644 shaders/sh_chromatic_aberration/sh_chromatic_aberration.vsh_mod create mode 100644 shaders/sh_clean_shape/sh_clean_shape.fsh_mod create mode 100644 shaders/sh_clean_shape/sh_clean_shape.vsh_mod create mode 100644 shaders/sh_color_adjust/sh_color_adjust.fsh_mod create mode 100644 shaders/sh_color_adjust/sh_color_adjust.vsh_mod create mode 100644 shaders/sh_color_picker_hue/sh_color_picker_hue.fsh_mod create mode 100644 shaders/sh_color_picker_hue/sh_color_picker_hue.vsh_mod create mode 100644 shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.fsh_mod create mode 100644 shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.vsh_mod create mode 100644 shaders/sh_color_picker_side_value/sh_color_picker_side_value.fsh_mod create mode 100644 shaders/sh_color_picker_side_value/sh_color_picker_side_value.vsh_mod create mode 100644 shaders/sh_color_picker_value/sh_color_picker_value.fsh_mod create mode 100644 shaders/sh_color_picker_value/sh_color_picker_value.vsh_mod create mode 100644 shaders/sh_color_remove/sh_color_remove.fsh_mod create mode 100644 shaders/sh_color_remove/sh_color_remove.vsh_mod create mode 100644 shaders/sh_color_replace/sh_color_replace.fsh_mod create mode 100644 shaders/sh_color_replace/sh_color_replace.vsh_mod create mode 100644 shaders/sh_color_select_content/sh_color_select_content.fsh_mod create mode 100644 shaders/sh_color_select_content/sh_color_select_content.vsh_mod create mode 100644 shaders/sh_color_select_side/sh_color_select_side.fsh_mod create mode 100644 shaders/sh_color_select_side/sh_color_select_side.vsh_mod create mode 100644 shaders/sh_colorize/sh_colorize.fsh_mod create mode 100644 shaders/sh_colorize/sh_colorize.vsh_mod create mode 100644 shaders/sh_colours_replace/sh_colours_replace.fsh_mod create mode 100644 shaders/sh_colours_replace/sh_colours_replace.vsh_mod create mode 100644 shaders/sh_combine_hsv/sh_combine_hsv.fsh_mod create mode 100644 shaders/sh_combine_hsv/sh_combine_hsv.vsh_mod create mode 100644 shaders/sh_combine_rgb/sh_combine_rgb.fsh_mod create mode 100644 shaders/sh_combine_rgb/sh_combine_rgb.vsh_mod create mode 100644 shaders/sh_content_sampler/sh_content_sampler.fsh_mod create mode 100644 shaders/sh_content_sampler/sh_content_sampler.vsh_mod create mode 100644 shaders/sh_convolution/sh_convolution.fsh_mod create mode 100644 shaders/sh_convolution/sh_convolution.vsh_mod create mode 100644 shaders/sh_coord/sh_coord.fsh_mod create mode 100644 shaders/sh_coord/sh_coord.vsh_mod create mode 100644 shaders/sh_corner/sh_corner.fsh_mod create mode 100644 shaders/sh_corner/sh_corner.vsh_mod create mode 100644 shaders/sh_corner_erode/sh_corner_erode.fsh_mod create mode 100644 shaders/sh_corner_erode/sh_corner_erode.vsh_mod create mode 100644 shaders/sh_corner_iterate/sh_corner_iterate.fsh_mod create mode 100644 shaders/sh_corner_iterate/sh_corner_iterate.vsh_mod create mode 100644 shaders/sh_cross_histogram/sh_cross_histogram.fsh_mod create mode 100644 shaders/sh_cross_histogram/sh_cross_histogram.vsh_mod create mode 100644 shaders/sh_cross_section/sh_cross_section.fsh_mod create mode 100644 shaders/sh_cross_section/sh_cross_section.vsh_mod create mode 100644 shaders/sh_curve/sh_curve.fsh_mod create mode 100644 shaders/sh_curve/sh_curve.vsh_mod create mode 100644 shaders/sh_curve_hsv/sh_curve_hsv.fsh_mod create mode 100644 shaders/sh_curve_hsv/sh_curve_hsv.vsh_mod create mode 100644 shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.fsh_mod create mode 100644 shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.vsh_mod create mode 100644 shaders/sh_d3d_background/sh_d3d_background.fsh_mod create mode 100644 shaders/sh_d3d_background/sh_d3d_background.vsh_mod create mode 100644 shaders/sh_d3d_default/sh_d3d_default.fsh_mod create mode 100644 shaders/sh_d3d_default/sh_d3d_default.vsh_mod create mode 100644 shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.fsh_mod create mode 100644 shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.vsh_mod create mode 100644 shaders/sh_d3d_geometry/sh_d3d_geometry.fsh_mod create mode 100644 shaders/sh_d3d_geometry/sh_d3d_geometry.vsh_mod create mode 100644 shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh_mod create mode 100644 shaders/sh_d3d_grid_view/sh_d3d_grid_view.vsh_mod create mode 100644 shaders/sh_d3d_normal/sh_d3d_normal.fsh_mod create mode 100644 shaders/sh_d3d_normal/sh_d3d_normal.vsh_mod create mode 100644 shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh_mod create mode 100644 shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.vsh_mod create mode 100644 shaders/sh_d3d_outline/sh_d3d_outline.fsh_mod create mode 100644 shaders/sh_d3d_outline/sh_d3d_outline.vsh_mod create mode 100644 shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.fsh_mod create mode 100644 shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.vsh_mod create mode 100644 shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh_mod create mode 100644 shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.vsh_mod create mode 100644 shaders/sh_d3d_silhouette/sh_d3d_silhouette.fsh_mod create mode 100644 shaders/sh_d3d_silhouette/sh_d3d_silhouette.vsh_mod create mode 100644 shaders/sh_d3d_ssao/sh_d3d_ssao.fsh_mod create mode 100644 shaders/sh_d3d_ssao/sh_d3d_ssao.vsh_mod create mode 100644 shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.fsh_mod create mode 100644 shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.vsh_mod create mode 100644 shaders/sh_d3d_wireframe/sh_d3d_wireframe.fsh_mod create mode 100644 shaders/sh_d3d_wireframe/sh_d3d_wireframe.vsh_mod create mode 100644 shaders/sh_de_corner/sh_de_corner.fsh_mod create mode 100644 shaders/sh_de_corner/sh_de_corner.vsh_mod create mode 100644 shaders/sh_de_stray/sh_de_stray.fsh_mod create mode 100644 shaders/sh_de_stray/sh_de_stray.vsh_mod create mode 100644 shaders/sh_default/sh_default.fsh_mod create mode 100644 shaders/sh_default/sh_default.vsh_mod create mode 100644 shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.fsh_mod create mode 100644 shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.vsh_mod create mode 100644 shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.fsh_mod create mode 100644 shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.vsh_mod create mode 100644 shaders/sh_diffuse_flow/sh_diffuse_flow.fsh_mod create mode 100644 shaders/sh_diffuse_flow/sh_diffuse_flow.vsh_mod create mode 100644 shaders/sh_diffuse_post/sh_diffuse_post.fsh_mod create mode 100644 shaders/sh_diffuse_post/sh_diffuse_post.vsh_mod create mode 100644 shaders/sh_dilate/sh_dilate.fsh_mod create mode 100644 shaders/sh_dilate/sh_dilate.vsh_mod create mode 100644 shaders/sh_displace/sh_displace.fsh_mod create mode 100644 shaders/sh_displace/sh_displace.vsh_mod create mode 100644 shaders/sh_dither/sh_dither.fsh_mod create mode 100644 shaders/sh_dither/sh_dither.vsh_mod create mode 100644 shaders/sh_dither_screen/sh_dither_screen.fsh_mod create mode 100644 shaders/sh_dither_screen/sh_dither_screen.vsh_mod create mode 100644 shaders/sh_downsample/sh_downsample.fsh_mod create mode 100644 shaders/sh_downsample/sh_downsample.vsh_mod create mode 100644 shaders/sh_draw_color/sh_draw_color.fsh_mod create mode 100644 shaders/sh_draw_color/sh_draw_color.vsh_mod create mode 100644 shaders/sh_draw_divide/sh_draw_divide.fsh_mod create mode 100644 shaders/sh_draw_divide/sh_draw_divide.vsh_mod create mode 100644 shaders/sh_draw_downsample/sh_draw_downsample.fsh_mod create mode 100644 shaders/sh_draw_downsample/sh_draw_downsample.vsh_mod create mode 100644 shaders/sh_draw_flare_star/sh_draw_flare_star.fsh_mod create mode 100644 shaders/sh_draw_flare_star/sh_draw_flare_star.vsh_mod create mode 100644 shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.fsh_mod create mode 100644 shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.vsh_mod create mode 100644 shaders/sh_draw_mapping/sh_draw_mapping.fsh_mod create mode 100644 shaders/sh_draw_mapping/sh_draw_mapping.vsh_mod create mode 100644 shaders/sh_draw_normal/sh_draw_normal.fsh_mod create mode 100644 shaders/sh_draw_normal/sh_draw_normal.vsh_mod create mode 100644 shaders/sh_draw_r16/sh_draw_r16.fsh_mod create mode 100644 shaders/sh_draw_r16/sh_draw_r16.vsh_mod create mode 100644 shaders/sh_draw_r32/sh_draw_r32.fsh_mod create mode 100644 shaders/sh_draw_r32/sh_draw_r32.vsh_mod create mode 100644 shaders/sh_draw_r8/sh_draw_r8.fsh_mod create mode 100644 shaders/sh_draw_r8/sh_draw_r8.vsh_mod create mode 100644 shaders/sh_draw_single_channel/sh_draw_single_channel.fsh_mod create mode 100644 shaders/sh_draw_single_channel/sh_draw_single_channel.vsh_mod create mode 100644 shaders/sh_draw_surface/sh_draw_surface.fsh_mod create mode 100644 shaders/sh_draw_surface/sh_draw_surface.vsh_mod create mode 100644 shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.fsh_mod create mode 100644 shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.vsh_mod create mode 100644 shaders/sh_draw_texture/sh_draw_texture.fsh_mod create mode 100644 shaders/sh_draw_texture/sh_draw_texture.vsh_mod create mode 100644 shaders/sh_draw_tile/sh_draw_tile.fsh_mod create mode 100644 shaders/sh_draw_tile/sh_draw_tile.vsh_mod create mode 100644 shaders/sh_draw_tile_apply/sh_draw_tile_apply.fsh_mod create mode 100644 shaders/sh_draw_tile_apply/sh_draw_tile_apply.vsh_mod create mode 100644 shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.fsh_mod create mode 100644 shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.vsh_mod create mode 100644 shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh_mod create mode 100644 shaders/sh_draw_tile_brush/sh_draw_tile_brush.vsh_mod create mode 100644 shaders/sh_draw_tile_clear/sh_draw_tile_clear.fsh_mod create mode 100644 shaders/sh_draw_tile_clear/sh_draw_tile_clear.vsh_mod create mode 100644 shaders/sh_draw_tile_map/sh_draw_tile_map.fsh_mod create mode 100644 shaders/sh_draw_tile_map/sh_draw_tile_map.vsh_mod create mode 100644 shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.fsh_mod create mode 100644 shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.vsh_mod create mode 100644 shaders/sh_edge_detect/sh_edge_detect.fsh_mod create mode 100644 shaders/sh_edge_detect/sh_edge_detect.vsh_mod create mode 100644 shaders/sh_edge_shade_apply/sh_edge_shade_apply.fsh_mod create mode 100644 shaders/sh_edge_shade_apply/sh_edge_shade_apply.vsh_mod create mode 100644 shaders/sh_edge_shade_convert/sh_edge_shade_convert.fsh_mod create mode 100644 shaders/sh_edge_shade_convert/sh_edge_shade_convert.vsh_mod create mode 100644 shaders/sh_edge_shade_extract/sh_edge_shade_extract.fsh_mod create mode 100644 shaders/sh_edge_shade_extract/sh_edge_shade_extract.vsh_mod create mode 100644 shaders/sh_erode/sh_erode.fsh_mod create mode 100644 shaders/sh_erode/sh_erode.vsh_mod create mode 100644 shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.fsh_mod create mode 100644 shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.vsh_mod create mode 100644 shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.fsh_mod create mode 100644 shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.vsh_mod create mode 100644 shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.fsh_mod create mode 100644 shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.vsh_mod create mode 100644 shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.fsh_mod create mode 100644 shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.vsh_mod create mode 100644 shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.fsh_mod create mode 100644 shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.vsh_mod create mode 100644 shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.fsh_mod create mode 100644 shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.vsh_mod create mode 100644 shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.fsh_mod create mode 100644 shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.vsh_mod create mode 100644 shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.fsh_mod create mode 100644 shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.vsh_mod create mode 100644 shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.fsh_mod create mode 100644 shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.vsh_mod create mode 100644 shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.fsh_mod create mode 100644 shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.vsh_mod create mode 100644 shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.fsh_mod create mode 100644 shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.vsh_mod create mode 100644 shaders/sh_fd_repulse/sh_fd_repulse.fsh_mod create mode 100644 shaders/sh_fd_repulse/sh_fd_repulse.vsh_mod create mode 100644 shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.fsh_mod create mode 100644 shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.vsh_mod create mode 100644 shaders/sh_fd_turbulence/sh_fd_turbulence.fsh_mod create mode 100644 shaders/sh_fd_turbulence/sh_fd_turbulence.vsh_mod create mode 100644 shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.fsh_mod create mode 100644 shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.vsh_mod create mode 100644 shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.vsh_mod create mode 100644 shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.vsh_mod create mode 100644 shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.vsh_mod create mode 100644 shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.vsh_mod create mode 100644 shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.vsh_mod create mode 100644 shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.vsh_mod create mode 100644 shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.fsh_mod create mode 100644 shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.vsh_mod create mode 100644 shaders/sh_fd_vortex/sh_fd_vortex.fsh_mod create mode 100644 shaders/sh_fd_vortex/sh_fd_vortex.vsh_mod create mode 100644 shaders/sh_find_boundary/sh_find_boundary.fsh_mod create mode 100644 shaders/sh_find_boundary/sh_find_boundary.vsh_mod create mode 100644 shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.fsh_mod create mode 100644 shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.vsh_mod create mode 100644 shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.fsh_mod create mode 100644 shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.vsh_mod create mode 100644 shaders/sh_find_pixel/sh_find_pixel.fsh_mod create mode 100644 shaders/sh_find_pixel/sh_find_pixel.vsh_mod create mode 100644 shaders/sh_flip/sh_flip.fsh_mod create mode 100644 shaders/sh_flip/sh_flip.vsh_mod create mode 100644 shaders/sh_flood_fill_it/sh_flood_fill_it.fsh_mod create mode 100644 shaders/sh_flood_fill_it/sh_flood_fill_it.vsh_mod create mode 100644 shaders/sh_flood_fill_replace/sh_flood_fill_replace.fsh_mod create mode 100644 shaders/sh_flood_fill_replace/sh_flood_fill_replace.vsh_mod create mode 100644 shaders/sh_flood_fill_thres/sh_flood_fill_thres.fsh_mod create mode 100644 shaders/sh_flood_fill_thres/sh_flood_fill_thres.vsh_mod create mode 100644 shaders/sh_fluid_bleach/sh_fluid_bleach.fsh_mod create mode 100644 shaders/sh_fluid_bleach/sh_fluid_bleach.vsh_mod create mode 100644 shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.fsh_mod create mode 100644 shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.vsh_mod create mode 100644 shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.fsh_mod create mode 100644 shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.vsh_mod create mode 100644 shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.fsh_mod create mode 100644 shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.vsh_mod create mode 100644 shaders/sh_gamma_map/sh_gamma_map.fsh_mod create mode 100644 shaders/sh_gamma_map/sh_gamma_map.vsh_mod create mode 100644 shaders/sh_get_max_downsampled/sh_get_max_downsampled.fsh_mod create mode 100644 shaders/sh_get_max_downsampled/sh_get_max_downsampled.vsh_mod create mode 100644 shaders/sh_get_min_downsampled/sh_get_min_downsampled.fsh_mod create mode 100644 shaders/sh_get_min_downsampled/sh_get_min_downsampled.vsh_mod create mode 100644 shaders/sh_glow/sh_glow.fsh_mod create mode 100644 shaders/sh_glow/sh_glow.vsh_mod create mode 100644 shaders/sh_gradient/sh_gradient.fsh_mod create mode 100644 shaders/sh_gradient/sh_gradient.vsh_mod create mode 100644 shaders/sh_gradient_display/sh_gradient_display.fsh_mod create mode 100644 shaders/sh_gradient_display/sh_gradient_display.vsh_mod create mode 100644 shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.fsh_mod create mode 100644 shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.vsh_mod create mode 100644 shaders/sh_gradient_points/sh_gradient_points.fsh_mod create mode 100644 shaders/sh_gradient_points/sh_gradient_points.vsh_mod create mode 100644 shaders/sh_grain/sh_grain.fsh_mod create mode 100644 shaders/sh_grain/sh_grain.vsh_mod create mode 100644 shaders/sh_grey_alpha/sh_grey_alpha.fsh_mod create mode 100644 shaders/sh_grey_alpha/sh_grey_alpha.vsh_mod create mode 100644 shaders/sh_greyscale/sh_greyscale.fsh_mod create mode 100644 shaders/sh_greyscale/sh_greyscale.vsh_mod create mode 100644 shaders/sh_grid/sh_grid.fsh_mod create mode 100644 shaders/sh_grid/sh_grid.vsh_mod create mode 100644 shaders/sh_grid_hex/sh_grid_hex.fsh_mod create mode 100644 shaders/sh_grid_hex/sh_grid_hex.vsh_mod create mode 100644 shaders/sh_grid_noise/sh_grid_noise.fsh_mod create mode 100644 shaders/sh_grid_noise/sh_grid_noise.vsh_mod create mode 100644 shaders/sh_grid_pentagonal/sh_grid_pentagonal.fsh_mod create mode 100644 shaders/sh_grid_pentagonal/sh_grid_pentagonal.vsh_mod create mode 100644 shaders/sh_grid_tri/sh_grid_tri.fsh_mod create mode 100644 shaders/sh_grid_tri/sh_grid_tri.vsh_mod create mode 100644 shaders/sh_herringbone_tile/sh_herringbone_tile.fsh_mod create mode 100644 shaders/sh_herringbone_tile/sh_herringbone_tile.vsh_mod create mode 100644 shaders/sh_high_pass/sh_high_pass.fsh_mod create mode 100644 shaders/sh_high_pass/sh_high_pass.vsh_mod create mode 100644 shaders/sh_image_trace/sh_image_trace.fsh_mod create mode 100644 shaders/sh_image_trace/sh_image_trace.vsh_mod create mode 100644 shaders/sh_interlaced/sh_interlaced.fsh_mod create mode 100644 shaders/sh_interlaced/sh_interlaced.vsh_mod create mode 100644 shaders/sh_interpret_number/sh_interpret_number.fsh_mod create mode 100644 shaders/sh_interpret_number/sh_interpret_number.vsh_mod create mode 100644 shaders/sh_invert/sh_invert.fsh_mod create mode 100644 shaders/sh_invert/sh_invert.vsh_mod create mode 100644 shaders/sh_jpeg_dct/sh_jpeg_dct.fsh_mod create mode 100644 shaders/sh_jpeg_dct/sh_jpeg_dct.vsh_mod create mode 100644 shaders/sh_jpeg_recons/sh_jpeg_recons.fsh_mod create mode 100644 shaders/sh_jpeg_recons/sh_jpeg_recons.vsh_mod create mode 100644 shaders/sh_kuwahara/sh_kuwahara.fsh_mod create mode 100644 shaders/sh_kuwahara/sh_kuwahara.vsh_mod create mode 100644 shaders/sh_kuwahara_ani/sh_kuwahara_ani.fsh_mod create mode 100644 shaders/sh_kuwahara_ani/sh_kuwahara_ani.vsh_mod create mode 100644 shaders/sh_level/sh_level.fsh_mod create mode 100644 shaders/sh_level/sh_level.vsh_mod create mode 100644 shaders/sh_level_selector/sh_level_selector.fsh_mod create mode 100644 shaders/sh_level_selector/sh_level_selector.vsh_mod create mode 100644 shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh_mod create mode 100644 shaders/sh_liquefy_bloat/sh_liquefy_bloat.vsh_mod create mode 100644 shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh_mod create mode 100644 shaders/sh_liquefy_pinch/sh_liquefy_pinch.vsh_mod create mode 100644 shaders/sh_liquefy_push/sh_liquefy_push.fsh_mod create mode 100644 shaders/sh_liquefy_push/sh_liquefy_push.vsh_mod create mode 100644 shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh_mod create mode 100644 shaders/sh_liquefy_twirl/sh_liquefy_twirl.vsh_mod create mode 100644 shaders/sh_local_analyze/sh_local_analyze.fsh_mod create mode 100644 shaders/sh_local_analyze/sh_local_analyze.vsh_mod create mode 100644 shaders/sh_lovify/sh_lovify.fsh_mod create mode 100644 shaders/sh_lovify/sh_lovify.vsh_mod create mode 100644 shaders/sh_lum2alpha/sh_lum2alpha.fsh_mod create mode 100644 shaders/sh_lum2alpha/sh_lum2alpha.vsh_mod create mode 100644 shaders/sh_mask/sh_mask.fsh_mod create mode 100644 shaders/sh_mask/sh_mask.vsh_mod create mode 100644 shaders/sh_mask_expand/sh_mask_expand.fsh_mod create mode 100644 shaders/sh_mask_expand/sh_mask_expand.vsh_mod create mode 100644 shaders/sh_mask_invert/sh_mask_invert.fsh_mod create mode 100644 shaders/sh_mask_invert/sh_mask_invert.vsh_mod create mode 100644 shaders/sh_mask_modify/sh_mask_modify.fsh_mod create mode 100644 shaders/sh_mask_modify/sh_mask_modify.vsh_mod create mode 100644 shaders/sh_mesh_generation/sh_mesh_generation.fsh_mod create mode 100644 shaders/sh_mesh_generation/sh_mesh_generation.vsh_mod create mode 100644 shaders/sh_mirror/sh_mirror.fsh_mod create mode 100644 shaders/sh_mirror/sh_mirror.vsh_mod create mode 100644 shaders/sh_mirror_mask/sh_mirror_mask.fsh_mod create mode 100644 shaders/sh_mirror_mask/sh_mirror_mask.vsh_mod create mode 100644 shaders/sh_mk_ballGrid/sh_mk_ballGrid.fsh_mod create mode 100644 shaders/sh_mk_ballGrid/sh_mk_ballGrid.vsh_mod create mode 100644 shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh_mod create mode 100644 shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh_mod create mode 100644 shaders/sh_mk_flag_shade/sh_mk_flag_shade.fsh_mod create mode 100644 shaders/sh_mk_flag_shade/sh_mk_flag_shade.vsh_mod create mode 100644 shaders/sh_mk_flipGrid/sh_mk_flipGrid.fsh_mod create mode 100644 shaders/sh_mk_flipGrid/sh_mk_flipGrid.vsh_mod create mode 100644 shaders/sh_mk_fracture/sh_mk_fracture.fsh_mod create mode 100644 shaders/sh_mk_fracture/sh_mk_fracture.vsh_mod create mode 100644 shaders/sh_mk_saber_glow/sh_mk_saber_glow.fsh_mod create mode 100644 shaders/sh_mk_saber_glow/sh_mk_saber_glow.vsh_mod create mode 100644 shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.fsh_mod create mode 100644 shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.vsh_mod create mode 100644 shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.fsh_mod create mode 100644 shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.vsh_mod create mode 100644 shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.fsh_mod create mode 100644 shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.vsh_mod create mode 100644 shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.fsh_mod create mode 100644 shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.vsh_mod create mode 100644 shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.fsh_mod create mode 100644 shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.vsh_mod create mode 100644 shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.fsh_mod create mode 100644 shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.vsh_mod create mode 100644 shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.fsh_mod create mode 100644 shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.vsh_mod create mode 100644 shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.fsh_mod create mode 100644 shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.vsh_mod create mode 100644 shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.fsh_mod create mode 100644 shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.vsh_mod create mode 100644 shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.fsh_mod create mode 100644 shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.vsh_mod create mode 100644 shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.fsh_mod create mode 100644 shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.vsh_mod create mode 100644 shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.fsh_mod create mode 100644 shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.vsh_mod create mode 100644 shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.fsh_mod create mode 100644 shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.vsh_mod create mode 100644 shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.fsh_mod create mode 100644 shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.vsh_mod create mode 100644 shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.fsh_mod create mode 100644 shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.vsh_mod create mode 100644 shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.fsh_mod create mode 100644 shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.vsh_mod create mode 100644 shaders/sh_morph_surface/sh_morph_surface.fsh_mod create mode 100644 shaders/sh_morph_surface/sh_morph_surface.vsh_mod create mode 100644 shaders/sh_node_arc/sh_node_arc.fsh_mod create mode 100644 shaders/sh_node_arc/sh_node_arc.vsh_mod create mode 100644 shaders/sh_node_circle/sh_node_circle.fsh_mod create mode 100644 shaders/sh_node_circle/sh_node_circle.vsh_mod create mode 100644 shaders/sh_node_widget_rotator/sh_node_widget_rotator.fsh_mod create mode 100644 shaders/sh_node_widget_rotator/sh_node_widget_rotator.vsh_mod create mode 100644 shaders/sh_node_widget_scalar/sh_node_widget_scalar.fsh_mod create mode 100644 shaders/sh_node_widget_scalar/sh_node_widget_scalar.vsh_mod create mode 100644 shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.fsh_mod create mode 100644 shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.vsh_mod create mode 100644 shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.fsh_mod create mode 100644 shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.vsh_mod create mode 100644 shaders/sh_noise/sh_noise.fsh_mod create mode 100644 shaders/sh_noise/sh_noise.vsh_mod create mode 100644 shaders/sh_noise_bubble/sh_noise_bubble.fsh_mod create mode 100644 shaders/sh_noise_bubble/sh_noise_bubble.vsh_mod create mode 100644 shaders/sh_noise_cristal/sh_noise_cristal.fsh_mod create mode 100644 shaders/sh_noise_cristal/sh_noise_cristal.vsh_mod create mode 100644 shaders/sh_noise_fbm/sh_noise_fbm.fsh_mod create mode 100644 shaders/sh_noise_fbm/sh_noise_fbm.vsh_mod create mode 100644 shaders/sh_noise_flow/sh_noise_flow.fsh_mod create mode 100644 shaders/sh_noise_flow/sh_noise_flow.vsh_mod create mode 100644 shaders/sh_noise_fold/sh_noise_fold.fsh_mod create mode 100644 shaders/sh_noise_fold/sh_noise_fold.vsh_mod create mode 100644 shaders/sh_noise_gabor/sh_noise_gabor.fsh_mod create mode 100644 shaders/sh_noise_gabor/sh_noise_gabor.vsh_mod create mode 100644 shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh_mod create mode 100644 shaders/sh_noise_grid_hex/sh_noise_grid_hex.vsh_mod create mode 100644 shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh_mod create mode 100644 shaders/sh_noise_grid_tri/sh_noise_grid_tri.vsh_mod create mode 100644 shaders/sh_noise_honey/sh_noise_honey.fsh_mod create mode 100644 shaders/sh_noise_honey/sh_noise_honey.vsh_mod create mode 100644 shaders/sh_noise_shard/sh_noise_shard.fsh_mod create mode 100644 shaders/sh_noise_shard/sh_noise_shard.vsh_mod create mode 100644 shaders/sh_noise_strand/sh_noise_strand.fsh_mod create mode 100644 shaders/sh_noise_strand/sh_noise_strand.vsh_mod create mode 100644 shaders/sh_noise_wavelet/sh_noise_wavelet.fsh_mod create mode 100644 shaders/sh_noise_wavelet/sh_noise_wavelet.vsh_mod create mode 100644 shaders/sh_normal/sh_normal.fsh_mod create mode 100644 shaders/sh_normal/sh_normal.vsh_mod create mode 100644 shaders/sh_normal_light/sh_normal_light.fsh_mod create mode 100644 shaders/sh_normal_light/sh_normal_light.vsh_mod create mode 100644 shaders/sh_normal_light_apply/sh_normal_light_apply.fsh_mod create mode 100644 shaders/sh_normal_light_apply/sh_normal_light_apply.vsh_mod create mode 100644 shaders/sh_normalize/sh_normalize.fsh_mod create mode 100644 shaders/sh_normalize/sh_normalize.vsh_mod create mode 100644 shaders/sh_offset/sh_offset.fsh_mod create mode 100644 shaders/sh_offset/sh_offset.vsh_mod create mode 100644 shaders/sh_outline/sh_outline.fsh_mod create mode 100644 shaders/sh_outline/sh_outline.vsh_mod create mode 100644 shaders/sh_outline_only/sh_outline_only.fsh_mod create mode 100644 shaders/sh_outline_only/sh_outline_only.vsh_mod create mode 100644 shaders/sh_override_channel/sh_override_channel.fsh_mod create mode 100644 shaders/sh_override_channel/sh_override_channel.vsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.fsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.vsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.fsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.vsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.fsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.vsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.fsh_mod create mode 100644 shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.vsh_mod create mode 100644 shaders/sh_palette_replace/sh_palette_replace.fsh_mod create mode 100644 shaders/sh_palette_replace/sh_palette_replace.vsh_mod create mode 100644 shaders/sh_palette_shift/sh_palette_shift.fsh_mod create mode 100644 shaders/sh_palette_shift/sh_palette_shift.vsh_mod create mode 100644 shaders/sh_path_fill_profile/sh_path_fill_profile.fsh_mod create mode 100644 shaders/sh_path_fill_profile/sh_path_fill_profile.vsh_mod create mode 100644 shaders/sh_pb_blob/sh_pb_blob.fsh_mod create mode 100644 shaders/sh_pb_blob/sh_pb_blob.vsh_mod create mode 100644 shaders/sh_pb_brick/sh_pb_brick.fsh_mod create mode 100644 shaders/sh_pb_brick/sh_pb_brick.vsh_mod create mode 100644 shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh_mod create mode 100644 shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh_mod create mode 100644 shaders/sh_pb_hash/sh_pb_hash.fsh_mod create mode 100644 shaders/sh_pb_hash/sh_pb_hash.vsh_mod create mode 100644 shaders/sh_pb_highlight/sh_pb_highlight.fsh_mod create mode 100644 shaders/sh_pb_highlight/sh_pb_highlight.vsh_mod create mode 100644 shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh_mod create mode 100644 shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh_mod create mode 100644 shaders/sh_pb_outline/sh_pb_outline.fsh_mod create mode 100644 shaders/sh_pb_outline/sh_pb_outline.vsh_mod create mode 100644 shaders/sh_pb_shade/sh_pb_shade.fsh_mod create mode 100644 shaders/sh_pb_shade/sh_pb_shade.vsh_mod create mode 100644 shaders/sh_pb_shade_half/sh_pb_shade_half.fsh_mod create mode 100644 shaders/sh_pb_shade_half/sh_pb_shade_half.vsh_mod create mode 100644 shaders/sh_pb_strip/sh_pb_strip.fsh_mod create mode 100644 shaders/sh_pb_strip/sh_pb_strip.vsh_mod create mode 100644 shaders/sh_pb_to_mask/sh_pb_to_mask.fsh_mod create mode 100644 shaders/sh_pb_to_mask/sh_pb_to_mask.vsh_mod create mode 100644 shaders/sh_perlin/sh_perlin.fsh_mod create mode 100644 shaders/sh_perlin/sh_perlin.vsh_mod create mode 100644 shaders/sh_perlin_extra/sh_perlin_extra.fsh_mod create mode 100644 shaders/sh_perlin_extra/sh_perlin_extra.vsh_mod create mode 100644 shaders/sh_perlin_smear/sh_perlin_smear.fsh_mod create mode 100644 shaders/sh_perlin_smear/sh_perlin_smear.vsh_mod create mode 100644 shaders/sh_perlin_tiled/sh_perlin_tiled.fsh_mod create mode 100644 shaders/sh_perlin_tiled/sh_perlin_tiled.vsh_mod create mode 100644 shaders/sh_pixel_cloud/sh_pixel_cloud.fsh_mod create mode 100644 shaders/sh_pixel_cloud/sh_pixel_cloud.vsh_mod create mode 100644 shaders/sh_pixel_math/sh_pixel_math.fsh_mod create mode 100644 shaders/sh_pixel_math/sh_pixel_math.vsh_mod create mode 100644 shaders/sh_pixel_sample/sh_pixel_sample.fsh_mod create mode 100644 shaders/sh_pixel_sample/sh_pixel_sample.vsh_mod create mode 100644 shaders/sh_pixel_sort/sh_pixel_sort.fsh_mod create mode 100644 shaders/sh_pixel_sort/sh_pixel_sort.vsh_mod create mode 100644 shaders/sh_polar/sh_polar.fsh_mod create mode 100644 shaders/sh_polar/sh_polar.vsh_mod create mode 100644 shaders/sh_posterize/sh_posterize.fsh_mod create mode 100644 shaders/sh_posterize/sh_posterize.vsh_mod create mode 100644 shaders/sh_posterize_palette/sh_posterize_palette.fsh_mod create mode 100644 shaders/sh_posterize_palette/sh_posterize_palette.vsh_mod create mode 100644 shaders/sh_preview_histogram/sh_preview_histogram.fsh_mod create mode 100644 shaders/sh_preview_histogram/sh_preview_histogram.vsh_mod create mode 100644 shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.fsh_mod create mode 100644 shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.vsh_mod create mode 100644 shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh_mod create mode 100644 shaders/sh_pytagorean_tile/sh_pytagorean_tile.vsh_mod create mode 100644 shaders/sh_quarsicrystal/sh_quarsicrystal.fsh_mod create mode 100644 shaders/sh_quarsicrystal/sh_quarsicrystal.vsh_mod create mode 100644 shaders/sh_random_tile/sh_random_tile.fsh_mod create mode 100644 shaders/sh_random_tile/sh_random_tile.vsh_mod create mode 100644 shaders/sh_rd_add/sh_rd_add.fsh_mod create mode 100644 shaders/sh_rd_add/sh_rd_add.vsh_mod create mode 100644 shaders/sh_rd_convert/sh_rd_convert.fsh_mod create mode 100644 shaders/sh_rd_convert/sh_rd_convert.vsh_mod create mode 100644 shaders/sh_rd_propagate/sh_rd_propagate.fsh_mod create mode 100644 shaders/sh_rd_propagate/sh_rd_propagate.vsh_mod create mode 100644 shaders/sh_rd_render/sh_rd_render.fsh_mod create mode 100644 shaders/sh_rd_render/sh_rd_render.vsh_mod create mode 100644 shaders/sh_region_fill_border/sh_region_fill_border.fsh_mod create mode 100644 shaders/sh_region_fill_border/sh_region_fill_border.vsh_mod create mode 100644 shaders/sh_region_fill_color/sh_region_fill_color.fsh_mod create mode 100644 shaders/sh_region_fill_color/sh_region_fill_color.vsh_mod create mode 100644 shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.fsh_mod create mode 100644 shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.vsh_mod create mode 100644 shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.fsh_mod create mode 100644 shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.vsh_mod create mode 100644 shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.fsh_mod create mode 100644 shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.vsh_mod create mode 100644 shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.fsh_mod create mode 100644 shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.vsh_mod create mode 100644 shaders/sh_region_fill_init/sh_region_fill_init.fsh_mod create mode 100644 shaders/sh_region_fill_init/sh_region_fill_init.vsh_mod create mode 100644 shaders/sh_region_fill_inner/sh_region_fill_inner.fsh_mod create mode 100644 shaders/sh_region_fill_inner/sh_region_fill_inner.vsh_mod create mode 100644 shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.fsh_mod create mode 100644 shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.vsh_mod create mode 100644 shaders/sh_region_fill_map/sh_region_fill_map.fsh_mod create mode 100644 shaders/sh_region_fill_map/sh_region_fill_map.vsh_mod create mode 100644 shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.fsh_mod create mode 100644 shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.vsh_mod create mode 100644 shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.fsh_mod create mode 100644 shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.vsh_mod create mode 100644 shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.fsh_mod create mode 100644 shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.vsh_mod create mode 100644 shaders/sh_remove_black/sh_remove_black.fsh_mod create mode 100644 shaders/sh_remove_black/sh_remove_black.vsh_mod create mode 100644 shaders/sh_replace_color/sh_replace_color.fsh_mod create mode 100644 shaders/sh_replace_color/sh_replace_color.vsh_mod create mode 100644 shaders/sh_rim/sh_rim.fsh_mod create mode 100644 shaders/sh_rim/sh_rim.vsh_mod create mode 100644 shaders/sh_rm_cloud/sh_rm_cloud.fsh_mod create mode 100644 shaders/sh_rm_cloud/sh_rm_cloud.vsh_mod create mode 100644 shaders/sh_rm_primitive/sh_rm_primitive.fsh_mod create mode 100644 shaders/sh_rm_primitive/sh_rm_primitive.vsh_mod create mode 100644 shaders/sh_rm_terrain/sh_rm_terrain.fsh_mod create mode 100644 shaders/sh_rm_terrain/sh_rm_terrain.vsh_mod create mode 100644 shaders/sh_rsh_corner/sh_rsh_corner.fsh_mod create mode 100644 shaders/sh_rsh_corner/sh_rsh_corner.vsh_mod create mode 100644 shaders/sh_rsh_erode/sh_rsh_erode.fsh_mod create mode 100644 shaders/sh_rsh_erode/sh_rsh_erode.vsh_mod create mode 100644 shaders/sh_rsh_rotate/sh_rsh_rotate.fsh_mod create mode 100644 shaders/sh_rsh_rotate/sh_rsh_rotate.vsh_mod create mode 100644 shaders/sh_sample/sh_sample.fsh_mod create mode 100644 shaders/sh_sample/sh_sample.vsh_mod create mode 100644 shaders/sh_sample_points/sh_sample_points.fsh_mod create mode 100644 shaders/sh_sample_points/sh_sample_points.vsh_mod create mode 100644 shaders/sh_sao/sh_sao.fsh_mod create mode 100644 shaders/sh_sao/sh_sao.vsh_mod create mode 100644 shaders/sh_scale2x/sh_scale2x.fsh_mod create mode 100644 shaders/sh_scale2x/sh_scale2x.vsh_mod create mode 100644 shaders/sh_scale3x/sh_scale3x.fsh_mod create mode 100644 shaders/sh_scale3x/sh_scale3x.vsh_mod create mode 100644 shaders/sh_scale_cleanedge/sh_scale_cleanedge.fsh_mod create mode 100644 shaders/sh_scale_cleanedge/sh_scale_cleanedge.vsh_mod create mode 100644 shaders/sh_sdf/sh_sdf.fsh_mod create mode 100644 shaders/sh_sdf/sh_sdf.vsh_mod create mode 100644 shaders/sh_sdf_dist/sh_sdf_dist.fsh_mod create mode 100644 shaders/sh_sdf_dist/sh_sdf_dist.vsh_mod create mode 100644 shaders/sh_sdf_tex/sh_sdf_tex.fsh_mod create mode 100644 shaders/sh_sdf_tex/sh_sdf_tex.vsh_mod create mode 100644 shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.fsh_mod create mode 100644 shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.vsh_mod create mode 100644 shaders/sh_seperate_shape_index/sh_seperate_shape_index.fsh_mod create mode 100644 shaders/sh_seperate_shape_index/sh_seperate_shape_index.vsh_mod create mode 100644 shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.fsh_mod create mode 100644 shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.vsh_mod create mode 100644 shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.fsh_mod create mode 100644 shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.vsh_mod create mode 100644 shaders/sh_shadow_cast/sh_shadow_cast.fsh_mod create mode 100644 shaders/sh_shadow_cast/sh_shadow_cast.vsh_mod create mode 100644 shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.fsh_mod create mode 100644 shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.vsh_mod create mode 100644 shaders/sh_shape/sh_shape.fsh_mod create mode 100644 shaders/sh_shape/sh_shape.vsh_mod create mode 100644 shaders/sh_shape_map_circle/sh_shape_map_circle.fsh_mod create mode 100644 shaders/sh_shape_map_circle/sh_shape_map_circle.vsh_mod create mode 100644 shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh_mod create mode 100644 shaders/sh_shape_map_polygon/sh_shape_map_polygon.vsh_mod create mode 100644 shaders/sh_simplex/sh_simplex.fsh_mod create mode 100644 shaders/sh_simplex/sh_simplex.vsh_mod create mode 100644 shaders/sh_skew/sh_skew.fsh_mod create mode 100644 shaders/sh_skew/sh_skew.vsh_mod create mode 100644 shaders/sh_sky_hosek/sh_sky_hosek.fsh_mod create mode 100644 shaders/sh_sky_hosek/sh_sky_hosek.vsh_mod create mode 100644 shaders/sh_sky_preetham/sh_sky_preetham.fsh_mod create mode 100644 shaders/sh_sky_preetham/sh_sky_preetham.vsh_mod create mode 100644 shaders/sh_sky_scattering/sh_sky_scattering.fsh_mod create mode 100644 shaders/sh_sky_scattering/sh_sky_scattering.vsh_mod create mode 100644 shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh_mod create mode 100644 shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.vsh_mod create mode 100644 shaders/sh_smear/sh_smear.fsh_mod create mode 100644 shaders/sh_smear/sh_smear.vsh_mod create mode 100644 shaders/sh_solid/sh_solid.fsh_mod create mode 100644 shaders/sh_solid/sh_solid.vsh_mod create mode 100644 shaders/sh_spherize/sh_spherize.fsh_mod create mode 100644 shaders/sh_spherize/sh_spherize.vsh_mod create mode 100644 shaders/sh_stripe/sh_stripe.fsh_mod create mode 100644 shaders/sh_stripe/sh_stripe.vsh_mod create mode 100644 shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.fsh_mod create mode 100644 shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.vsh_mod create mode 100644 shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.fsh_mod create mode 100644 shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.vsh_mod create mode 100644 shaders/sh_surface_replace_find/sh_surface_replace_find.fsh_mod create mode 100644 shaders/sh_surface_replace_find/sh_surface_replace_find.vsh_mod create mode 100644 shaders/sh_surface_replace_replace/sh_surface_replace_replace.fsh_mod create mode 100644 shaders/sh_surface_replace_replace/sh_surface_replace_replace.vsh_mod create mode 100644 shaders/sh_svg_curve_quad/sh_svg_curve_quad.fsh_mod create mode 100644 shaders/sh_svg_curve_quad/sh_svg_curve_quad.vsh_mod create mode 100644 shaders/sh_svg_fill/sh_svg_fill.fsh_mod create mode 100644 shaders/sh_svg_fill/sh_svg_fill.vsh_mod create mode 100644 shaders/sh_texture_atlas/sh_texture_atlas.fsh_mod create mode 100644 shaders/sh_texture_atlas/sh_texture_atlas.vsh_mod create mode 100644 shaders/sh_texture_remap/sh_texture_remap.fsh_mod create mode 100644 shaders/sh_texture_remap/sh_texture_remap.vsh_mod create mode 100644 shaders/sh_texture_repeat/sh_texture_repeat.fsh_mod create mode 100644 shaders/sh_texture_repeat/sh_texture_repeat.vsh_mod create mode 100644 shaders/sh_threshold/sh_threshold.fsh_mod create mode 100644 shaders/sh_threshold/sh_threshold.vsh_mod create mode 100644 shaders/sh_tile_random/sh_tile_random.fsh_mod create mode 100644 shaders/sh_tile_random/sh_tile_random.vsh_mod create mode 100644 shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh_mod create mode 100644 shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh_mod create mode 100644 shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh_mod create mode 100644 shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh_mod create mode 100644 shaders/sh_time_remap/sh_time_remap.fsh_mod create mode 100644 shaders/sh_time_remap/sh_time_remap.vsh_mod create mode 100644 shaders/sh_trail_filler/sh_trail_filler.fsh_mod create mode 100644 shaders/sh_trail_filler/sh_trail_filler.vsh_mod create mode 100644 shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.fsh_mod create mode 100644 shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.vsh_mod create mode 100644 shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.fsh_mod create mode 100644 shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.vsh_mod create mode 100644 shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.fsh_mod create mode 100644 shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.vsh_mod create mode 100644 shaders/sh_twirl/sh_twirl.fsh_bak create mode 100644 shaders/sh_twirl/sh_twirl.fsh_mod create mode 100644 shaders/sh_twirl/sh_twirl.vsh_mod create mode 100644 shaders/sh_ui_rotator/sh_ui_rotator.fsh_mod create mode 100644 shaders/sh_ui_rotator/sh_ui_rotator.vsh_mod create mode 100644 shaders/sh_ui_shape_circle/sh_ui_shape_circle.fsh_mod create mode 100644 shaders/sh_ui_shape_circle/sh_ui_shape_circle.vsh_mod create mode 100644 shaders/sh_ui_slider/sh_ui_slider.fsh_mod create mode 100644 shaders/sh_ui_slider/sh_ui_slider.vsh_mod create mode 100644 shaders/sh_vector_diverge/sh_vector_diverge.fsh_mod create mode 100644 shaders/sh_vector_diverge/sh_vector_diverge.vsh_mod create mode 100644 shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.fsh_mod create mode 100644 shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.vsh_mod create mode 100644 shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.fsh_mod create mode 100644 shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.vsh_mod create mode 100644 shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.fsh_mod create mode 100644 shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.vsh_mod create mode 100644 shaders/sh_vertex_pt/sh_vertex_pt.fsh_mod create mode 100644 shaders/sh_vertex_pt/sh_vertex_pt.vsh_mod create mode 100644 shaders/sh_vignette/sh_vignette.fsh_mod create mode 100644 shaders/sh_vignette/sh_vignette.vsh_mod create mode 100644 shaders/sh_voronoi_extra/sh_voronoi_extra.fsh_mod create mode 100644 shaders/sh_voronoi_extra/sh_voronoi_extra.vsh_mod create mode 100644 shaders/sh_warp_4points/sh_warp_4points.fsh_mod create mode 100644 shaders/sh_warp_4points/sh_warp_4points.vsh_mod create mode 100644 shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh_mod create mode 100644 shaders/sh_warp_4points_pers/sh_warp_4points_pers.vsh_mod create mode 100644 shaders/sh_water_caustic/sh_water_caustic.fsh_mod create mode 100644 shaders/sh_water_caustic/sh_water_caustic.vsh_mod create mode 100644 shaders/sh_widget_rotator/sh_widget_rotator.fsh_mod create mode 100644 shaders/sh_widget_rotator/sh_widget_rotator.vsh_mod create mode 100644 shaders/sh_widget_rotator_range/sh_widget_rotator_range.fsh_mod create mode 100644 shaders/sh_widget_rotator_range/sh_widget_rotator_range.vsh_mod create mode 100644 shaders/sh_zigzag/sh_zigzag.fsh_mod create mode 100644 shaders/sh_zigzag/sh_zigzag.vsh_mod diff --git a/PixelComposer.yyp b/PixelComposer.yyp index af0dfbacd..b79357431 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -615,6 +615,9 @@ {"$GMIncludedFile":"","%Name":"CommonPS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonPS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"CommonVS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonVS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"rubber_duck_toy_1k.bin","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"rubber_duck_toy_1k.bin","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, + {"$GMIncludedFile":"","%Name":"sampler_simple.glsl","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"sampler_simple.glsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, + {"$GMIncludedFile":"","%Name":"sampler.glsl","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"sampler.glsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, + {"$GMIncludedFile":"","%Name":"shader_replace.py","CopyToMask":-1,"filePath":"datafiles/Shaders","name":"shader_replace.py","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"snap_license.txt","CopyToMask":-1,"filePath":"datafiles","name":"snap_license.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"ucrtbased.dll","ConfigValues":{},"CopyToMask":-1,"filePath":"datafiles","name":"ucrtbased.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, {"$GMIncludedFile":"","%Name":"webpmux.exe","CopyToMask":-1,"filePath":"datafiles/webp","name":"webpmux.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",}, diff --git a/datafiles/Shaders/sampler.glsl b/datafiles/Shaders/sampler.glsl new file mode 100644 index 000000000..4b9ae622f --- /dev/null +++ b/datafiles/Shaders/sampler.glsl @@ -0,0 +1,86 @@ + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } \ No newline at end of file diff --git a/datafiles/Shaders/sampler_simple.glsl b/datafiles/Shaders/sampler_simple.glsl new file mode 100644 index 000000000..74a2f9de1 --- /dev/null +++ b/datafiles/Shaders/sampler_simple.glsl @@ -0,0 +1,13 @@ + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } \ No newline at end of file diff --git a/datafiles/Shaders/shader_replace.py b/datafiles/Shaders/shader_replace.py new file mode 100644 index 000000000..50bac7433 --- /dev/null +++ b/datafiles/Shaders/shader_replace.py @@ -0,0 +1,65 @@ +import os +import re + +lib = [] +modified = 0 + +def replace_shader(shader_path): + with open(shader_path, 'r') as f: + shader = f.read() + + edit = False + + for lName, lCon, lModi in lib: + reg = f'\n#region -- {lName} --' + ereg = f'\n#endregion -- {lName} --\n' + + if f'#pragma use({lName})' not in shader: + continue + + if reg not in shader: + shader = f'#pragma use({lName})\n' + reg + f' [{lModi}]\n' + lCon + ereg + re.sub(fr'#pragma use\({lName}\)\n', '', shader) + edit = True + else: + modi = re.search(r'\[(.*)\]', shader.split(reg)[1]).group(0) + modi = float(modi[1:-1]) + + if modi != lModi: + pre_sh = shader.split(reg)[0] + post_sh = shader.split(ereg)[1] + + shader = pre_sh + reg + f' [{lModi}]\n' + lCon + ereg + post_sh + edit = True + + if edit: + with open(shader_path, 'w') as f: + f.write(shader) + + global modified + modified += 1 + +###################################################################################################### + +gm_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../')) + +for l in os.listdir(f'{gm_dir}/datafiles/Shaders'): + path = f'{gm_dir}/datafiles/Shaders/{l}' + if not os.path.isfile(path): + continue + + name = l.split('.')[0] + ext = l.split('.')[1] + if ext != 'glsl': + continue + + with open(path, 'r') as f: + modi = os.path.getmtime(path) + lib.append((name, f.read(), modi)) + + print(f' > Using library {name} ({modi})') + +for sh in os.listdir(f'{gm_dir}/shaders'): + fsh = f'{gm_dir}/shaders/{sh}/{sh}.fsh' + replace_shader(fsh) + +print(f'\nModified {modified} shaders') \ No newline at end of file diff --git a/pre_build_step.bat b/pre_build_step.bat new file mode 100644 index 000000000..ba7d87571 --- /dev/null +++ b/pre_build_step.bat @@ -0,0 +1 @@ +py "%~dp0datafiles/Shaders/shader_replace.py" \ No newline at end of file diff --git a/scripts/__tiler_autotile/__tiler_autotile.gml b/scripts/__tiler_autotile/__tiler_autotile.gml index 64d3a0b9b..b0421dc08 100644 --- a/scripts/__tiler_autotile/__tiler_autotile.gml +++ b/scripts/__tiler_autotile/__tiler_autotile.gml @@ -2,9 +2,11 @@ enum AUTOTILE_TYPE { box9, side15, top48, + top55, } function tiler_brush_autotile(_type, _index) constructor { + name = "autotile"; type = _type; index = _index; @@ -13,22 +15,11 @@ function tiler_brush_autotile(_type, _index) constructor { drawing_surface = noone; target_surface = noone; eraseMode = false; - bitmask = []; - switch(type) { - case AUTOTILE_TYPE.box9 : - // - 1 - | 0 1 2 - // 2 x 4 | 3 4 5 - // - 8 - | 6 7 8 - - bitmask = [ 4, - /* 1 */ 7, - /* 2 */ 5, 8, - /* 4 */ 3, 6, 4, 7, - /* 8 */ 1, 4, 2, 5, 0, 3, 1, 4, - ]; - break; - } + preview_surface = noone; + preview_surface_tile = noone; + + open = false; static drawing_start = function(surface, _erase = false) { target_surface = surface; @@ -50,7 +41,7 @@ function tiler_brush_autotile(_type, _index) constructor { static apply_drawing = function() { var _dim = surface_get_dimension(target_surface); mask_surface = surface_verify(mask_surface, _dim[0], _dim[1], surface_r8unorm); - update_surface = surface_verify(update_surface, _dim[0], _dim[1], surface_r16float); + update_surface = surface_verify(update_surface, _dim[0], _dim[1], surface_rgba16float); // autotile mask // #000000 : not part of autotile @@ -69,8 +60,6 @@ function tiler_brush_autotile(_type, _index) constructor { shader_set_2("dimension", _dim); shader_set_surface("maskSurface", mask_surface); - shader_set_i("bitmask", bitmask); - shader_set_i("bitmaskSize", array_length(bitmask)); shader_set_i("bitmaskType", type); shader_set_i("indexes", index); diff --git a/scripts/__tiler_brush/__tiler_brush.gml b/scripts/__tiler_brush/__tiler_brush.gml index 7f17e4032..106a7efa8 100644 --- a/scripts/__tiler_brush/__tiler_brush.gml +++ b/scripts/__tiler_brush/__tiler_brush.gml @@ -3,6 +3,7 @@ function tiler_brush(node) constructor { brush_indices = [[]]; brush_width = 0; brush_height = 0; + brush_varient = 0; brush_surface = noone; brush_erase = false; autotiler = noone; @@ -54,14 +55,12 @@ function tiler_brush(node) constructor { function tiler_draw_point_brush(brush, _x, _y, _shader = true) { if(brush.brush_height * brush.brush_width == 0) return; - if(_shader) { - shader_set(sh_draw_tile_brush); - BLEND_OVERRIDE - } + if(_shader) { shader_set(sh_draw_tile_brush); BLEND_OVERRIDE } for( var i = 0, n = brush.brush_height; i < n; i++ ) for( var j = 0, m = brush.brush_width; j < m; j++ ) { - shader_set_f("index", brush.brush_erase? -1 : brush.brush_indices[i][j]); + shader_set_f("index", brush.brush_erase? -1 : brush.brush_indices[i][j]); + shader_set_f("varient", brush.brush_erase? 0 : brush.brush_varient); var _xx = _x + j; var _yy = _y + i; @@ -77,23 +76,18 @@ function tiler_draw_point_brush(brush, _x, _y, _shader = true) { } } - if(_shader) { - BLEND_NORMAL - shader_reset(); - } + if(_shader) { BLEND_NORMAL shader_reset(); } } function tiler_draw_line_brush(brush, _x0, _y0, _x1, _y1, _shader = true) { if(brush.brush_height * brush.brush_width == 0) return; - if(_shader) { - shader_set(sh_draw_tile_brush); - BLEND_OVERRIDE - } + if(_shader) { shader_set(sh_draw_tile_brush); BLEND_OVERRIDE } for( var i = 0, n = brush.brush_height; i < n; i++ ) for( var j = 0, m = brush.brush_width; j < m; j++ ) { - shader_set_f("index", brush.brush_erase? -1 : brush.brush_indices[i][j]); + shader_set_f("index", brush.brush_erase? -1 : brush.brush_indices[i][j]); + shader_set_f("varient", brush.brush_erase? 0 : brush.brush_varient); var _xx0 = _x0 + j; var _yy0 = _y0 + i; @@ -122,10 +116,7 @@ function tiler_draw_line_brush(brush, _x0, _y0, _x1, _y1, _shader = true) { } } - if(_shader) { - BLEND_NORMAL - shader_reset(); - } + if(_shader) { BLEND_NORMAL shader_reset(); } } function tiler_draw_rect_brush(brush, _x0, _y0, _x1, _y1, _fill, _shader = true) { @@ -150,12 +141,19 @@ function tiler_draw_rect_brush(brush, _x0, _y0, _x1, _y1, _fill, _shader = true) var _max_x = max(_x0, _x1); var _min_y = min(_y0, _y1); var _may_y = max(_y0, _y1); + + if(_fill) { + if(_shader) { shader_set(sh_draw_tile_brush); BLEND_OVERRIDE shader_set_f("index", brush.brush_indices[0][0]); shader_set_f("varient", brush.brush_varient); } + draw_rectangle(_min_x, _min_y, _max_x, _may_y, 0); + if(_shader) { BLEND_NORMAL shader_reset(); } + } - if(_fill) draw_rectangle(_min_x, _min_y, _max_x, _may_y, 0); - - if(brush.brush_size == 1 && !is_surface(brush.brush_surface)) + if(brush.brush_size == 1) { + if(_shader) { shader_set(sh_draw_tile_brush); BLEND_OVERRIDE shader_set_f("index", brush.brush_indices[0][0]); shader_set_f("varient", brush.brush_varient); } draw_rectangle(_min_x + 1, _min_y + 1, _max_x - 1, _may_y - 1, 1); - else { + if(_shader) { BLEND_NORMAL shader_reset(); } + + } else { tiler_draw_line_brush(brush, _min_x, _min_y, _max_x, _min_y, _shader); tiler_draw_line_brush(brush, _min_x, _min_y, _min_x, _may_y, _shader); tiler_draw_line_brush(brush, _max_x, _may_y, _max_x, _min_y, _shader); @@ -187,41 +185,22 @@ function tiler_draw_ellp_brush(brush, _x0, _y0, _x1, _y1, _fill, _shader = true) var _min_y = min(_y0, _y1) - 0.5; var _max_y = max(_y0, _y1) - 0.5; - if(!is_surface(brush.brush_surface)) { - if(_fill) draw_ellipse(_min_x, _min_y, _max_x, _max_y, 0); - - if(brush.brush_size == 1) { - draw_ellipse(_min_x, _min_y, _max_x, _max_y, 1); - - } else if(brush.brush_size < global.FIX_POINTS_AMOUNT) { - - var fx = global.FIX_POINTS[brush.brush_size]; - for( var i = 0, n = array_length(fx); i < n; i++ ) - draw_ellipse(_min_x + fx[i][0], _min_y + fx[i][1], _max_x + fx[i][0], _max_y + fx[i][1], 1); - - } else { - draw_ellipse(_min_x, _min_y, _max_x, _max_y, brush.brush_size); - - } - return; - } + if(_shader) { shader_set(sh_draw_tile_brush); BLEND_OVERRIDE shader_set_f("index", brush.brush_indices[0][0]); shader_set_f("varient", brush.brush_varient); } if(_fill) draw_ellipse(_min_x, _min_y, _max_x, _max_y, 0); + + if(brush.brush_size == 1) { + draw_ellipse(_min_x, _min_y, _max_x, _max_y, 1); - var samp = 64; - var cx = (_min_x + _max_x) / 2; - var cy = (_min_y + _max_y) / 2; - var rx = abs(_x0 - _x1) / 2; - var ry = abs(_y0 - _y1) / 2; - - var ox, oy, nx, ny; - for( var i = 0; i <= samp; i++ ) { - nx = round(cx + lengthdir_x(rx, 360 / samp * i)); - ny = round(cy + lengthdir_y(ry, 360 / samp * i)); - - if(i) tiler_draw_line_brush(brush, ox, oy, nx, ny, _shader); - - ox = nx; - oy = ny; + } else if(brush.brush_size < global.FIX_POINTS_AMOUNT) { + + var fx = global.FIX_POINTS[brush.brush_size]; + for( var i = 0, n = array_length(fx); i < n; i++ ) + draw_ellipse(_min_x + fx[i][0], _min_y + fx[i][1], _max_x + fx[i][0], _max_y + fx[i][1], 1); + + } else { + draw_ellipse(_min_x, _min_y, _max_x, _max_y, brush.brush_size); } + + if(_shader) { BLEND_NORMAL shader_reset(); } } \ No newline at end of file diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index fb5dee2e7..d1b15b0f1 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -42,7 +42,7 @@ LATEST_VERSION = 1_18_00_0; VERSION = 1_18_01_0; SAVE_VERSION = 1_18_02_0; - VERSION_STRING = MAC? "1.18.003m" : "1.18.3.002"; + VERSION_STRING = MAC? "1.18.003m" : "1.18.3.003"; BUILD_NUMBER = 1_18_01_0; HOTKEYS = ds_map_create(); diff --git a/scripts/node_attributes/node_attributes.gml b/scripts/node_attributes/node_attributes.gml index c643b7fe0..510b056e9 100644 --- a/scripts/node_attributes/node_attributes.gml +++ b/scripts/node_attributes/node_attributes.gml @@ -4,7 +4,8 @@ new scrollItem("Pixel"), new scrollItem("Bilinear"), new scrollItem("Bicubic"), - new scrollItem("radSin"), + // new scrollItem("RadSin"), + new scrollItem("Lanczos3"), ]; global.SURFACE_OVERSAMPLE = [ diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index 0c92b1e20..f00b8a266 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -43,7 +43,6 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) if(is_real(renaming)) inputs[renaming].setName(_name); - else if(is_struct(renaming) && is_instanceof(renaming, Node)) renaming.setDisplayName(_name) diff --git a/scripts/node_tiler/node_tiler.gml b/scripts/node_tiler/node_tiler.gml index 51e4c7fa6..9a949be7d 100644 --- a/scripts/node_tiler/node_tiler.gml +++ b/scripts/node_tiler/node_tiler.gml @@ -2,6 +2,16 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou name = "Tile Drawer"; bypass_grid = true; + renaming = noone; + rename_text = ""; + tb_rename = new textBox(TEXTBOX_INPUT.text, function(_name) { + if(renaming == noone) return; + renaming.name = _name; + renaming = noone; + }); + tb_rename.font = f_p2; + tb_rename.hide = true; + newInput( 0, nodeValue_Surface("Tileset", self, noone)); newInput( 1, nodeValue_IVec2("Map size", self, [ 16, 16 ])); @@ -15,8 +25,8 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou tile_selector_x = 0; tile_selector_y = 0; - tile_selector_s = 1; - tile_selector_s_to = 1; + tile_selector_s = 2; + tile_selector_s_to = 2; tile_dragging = false; tile_drag_sx = 0; @@ -24,6 +34,9 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou tile_drag_mx = 0; tile_drag_my = 0; + selecting_surface = noone; + selecting_surface_tile = noone; + tile_selecting = false; tile_select_ss = [ 0, 0 ]; @@ -34,23 +47,21 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou tile_selector = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { var _h = tile_selector_h; var _pd = ui(4); - var _tileSet = current_data[0]; - var _tileSiz = current_data[2]; + var _tileSet = array_safe_get(current_data, 0); + var _tileSiz = array_safe_get(current_data, 2); var _sx = _x + _pd; var _sy = _y + _pd; var _sw = _w - _pd * 2; var _sh = _h - _pd * 2; - draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, c_white, 1); + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1); tile_selector_surface = surface_verify(tile_selector_surface, _sw, _sh); tile_selector_mask = surface_verify(tile_selector_mask, _sw, _sh); autotile_selector_mask = surface_verify(autotile_selector_mask, _sw, _sh); if(!is_surface(_tileSet)) return _h; - var _tdim = surface_get_dimension(_tileSet); - var _tileAmo = [ floor(_tdim[0] / _tileSiz[0]), floor(_tdim[1] / _tileSiz[1]) ]; var _tileSel_w = _tileSiz[0] * tile_selector_s; @@ -61,16 +72,17 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _mtx = floor(_msx / tile_selector_s / _tileSiz[0]); var _mty = floor(_msy / tile_selector_s / _tileSiz[1]); - var _mid = _mtx >= 0 && _mtx < _tileAmo[0] && _mty >= 0 && _mtx < _tileAmo[1]? _mty * _tileAmo[0] + _mtx : noone; + var _mid = _mtx >= 0 && _mtx < _tileAmo[0] && _mty >= 0 && _mty < _tileAmo[1]? _mty * _tileAmo[0] + _mtx : noone; var _tileHov_x = tile_selector_x + _mtx * _tileSiz[0] * tile_selector_s; var _tileHov_y = tile_selector_y + _mty * _tileSiz[1] * tile_selector_s; var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h); - surface_set_target(tile_selector_surface); - draw_clear(COLORS.panel_bg_clear); - draw_sprite_tiled_ext(s_transparent, 0, tile_selector_x, tile_selector_y, tile_selector_s, tile_selector_s, COLORS.panel_preview_transparent, 1); + #region surface_set_target(tile_selector_surface); + surface_set_target(tile_selector_surface); + draw_clear(colorMultiply(COLORS.panel_bg_clear, COLORS.node_composite_bg_blend)); + draw_sprite_tiled_ext(s_transparent, 0, tile_selector_x, tile_selector_y, tile_selector_s, tile_selector_s, colorMultiply(COLORS.panel_preview_transparent, COLORS.node_composite_bg_blend), 1); draw_surface_ext(_tileSet, tile_selector_x, tile_selector_y, tile_selector_s, tile_selector_s, 0, c_white, 1); @@ -110,14 +122,25 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou draw_rectangle_width(_tileHov_x, _tileHov_y, _tileHov_x + _tileSel_w - 1, _tileHov_y + _tileSel_h - 1, 1); if(_hov && _mid > noone && mouse_press(mb_left, _focus)) { - tile_selecting = true; - tile_select_ss = [ _mtx, _mty ]; + + if(autotile_subtile_selecting == noone) { + autotile_selecting = noone; + tile_selecting = true; + tile_select_ss = [ _mtx, _mty ]; + + } else { + autotiles[autotile_selecting].index[autotile_subtile_selecting] = _mid; + autotile_subtile_selecting++; + if(autotile_subtile_selecting >= array_length(autotiles[autotile_selecting].index)) + autotile_subtile_selecting = noone; + } } surface_reset_target(); + #endregion + #region surface_set_target(tile_selector_mask); surface_set_target(tile_selector_mask); DRAW_CLEAR - draw_set_color(c_white); for( var i = 0, n = array_length(brush.brush_indices); i < n; i++ ) @@ -130,6 +153,7 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou draw_rectangle(_tileSel_x, _tileSel_y, _tileSel_x + _tileSel_w, _tileSel_y + _tileSel_h, false); } surface_reset_target(); + #endregion #region tile selection if(tile_selecting) { @@ -174,8 +198,10 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou } var _s = tile_selector_s; - if(mouse_wheel_up()) { tile_selector_s_to = clamp(tile_selector_s_to * 1.2, 0.5, 4); } - if(mouse_wheel_down()) { tile_selector_s_to = clamp(tile_selector_s_to / 1.2, 0.5, 4); } + if(key_mod_press(CTRL)) { + if(mouse_wheel_up()) { tile_selector_s_to = clamp(tile_selector_s_to * 1.2, 0.5, 4); } + if(mouse_wheel_down()) { tile_selector_s_to = clamp(tile_selector_s_to / 1.2, 0.5, 4); } + } tile_selector_s = lerp_float(tile_selector_s, tile_selector_s_to, 2); if(_s != tile_selector_s) { @@ -202,37 +228,110 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou draw_surface(tile_selector_surface, _sx, _sy); shader_set(sh_brush_outline); + var _brush_tiles = brush.brush_width * brush.brush_height; + var _cc = c_white; + if(_brush_tiles == 9 || _brush_tiles == 15 || _brush_tiles == 48 || _brush_tiles == 55) _cc = COLORS._main_value_positive; + shader_set_f("dimension", _sw, _sh); - draw_surface(tile_selector_mask, _sx, _sy); + draw_surface_ext(tile_selector_mask, _sx, _sy, 1, 1, 0, _cc, 1); shader_reset(); - #region autotile + if(autotile_selecting != noone) { // autotile + var _att = autotiles[autotile_selecting]; - for( var i = 0, n = array_length(autotiles); i < n; i++ ) { - var _att = autotiles[i]; - - surface_set_target(autotile_selector_mask); - DRAW_CLEAR - - draw_set_color(c_white); - for( var j = 0, m = array_length(_att.index); j < m; j++ ) { - var _bindex = _att.index[j]; - var _tileSel_row = floor(_bindex / _tileAmo[0]); - var _tileSel_col = safe_mod(_bindex, _tileAmo[0]); - var _tileSel_x = tile_selector_x + _tileSel_col * _tileSiz[0] * tile_selector_s; - var _tileSel_y = tile_selector_y + _tileSel_row * _tileSiz[1] * tile_selector_s; - draw_rectangle(_tileSel_x, _tileSel_y, _tileSel_x + _tileSel_w, _tileSel_y + _tileSel_h, false); - } - surface_reset_target(); - - shader_set(sh_brush_outline); - shader_set_f("dimension", _sw, _sh); - draw_surface_ext(autotile_selector_mask, _sx, _sy, 1, 1, 0, COLORS._main_accent, 1); - shader_reset(); - + surface_set_target(autotile_selector_mask); + DRAW_CLEAR + + draw_set_color(c_white); + for( var j = 0, m = array_length(_att.index); j < m; j++ ) { + var _bindex = _att.index[j]; + var _tileSel_row = floor(_bindex / _tileAmo[0]); + var _tileSel_col = safe_mod(_bindex, _tileAmo[0]); + var _tileSel_x = tile_selector_x + _tileSel_col * _tileSiz[0] * tile_selector_s; + var _tileSel_y = tile_selector_y + _tileSel_row * _tileSiz[1] * tile_selector_s; + draw_rectangle(_tileSel_x, _tileSel_y, _tileSel_x + _tileSel_w, _tileSel_y + _tileSel_h, false); + } + surface_reset_target(); + + shader_set(sh_brush_outline); + shader_set_f("dimension", _sw, _sh); + draw_surface_ext(autotile_selector_mask, _sx, _sy, 1, 1, 0, COLORS._main_accent, 1); + shader_reset(); + } + + #region varients + var _bw = power(2, ceil(log2(brush.brush_width))); + var _bh = power(2, ceil(log2(brush.brush_height))); + var _sel_sw = brush.brush_width * _tileSiz[0]; + var _sel_sh = brush.brush_height * _tileSiz[1]; + + selecting_surface = surface_verify(selecting_surface, _bw, _bh, surface_rgba16float); + selecting_surface_tile = surface_verify(selecting_surface_tile, _sel_sw, _sel_sh); + + var _ty = _y + _h + ui(8); + var _th = ui(48); + _h += ui(8) + _th; + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _ty, _w, _th, COLORS.node_composite_bg_blend, 1); + + var _sx = _x + ui(8); + var _variences = [ 0, 1, 2, 3, 8, 16 ]; + + if(brush.brush_width * brush.brush_height > 1) { + _variences = [ 0 ]; + brush.brush_varient = 0; } - #endregion + for( var v = 0, p = array_length(_variences); v < p; v++ ) { + + surface_set_shader(selecting_surface, sh_draw_tile_brush, true, BLEND.over); + for( var i = 0, n = array_length(brush.brush_indices); i < n; i++ ) + for( var j = 0, m = array_length(brush.brush_indices[i]); j < m; j++ ) { + var _bindex = brush.brush_indices[i][j]; + shader_set_f("index", _bindex); + shader_set_f("varient", _variences[v]); + draw_point(j, i); + } + surface_reset_shader(); + + var _tileSetDim = surface_get_dimension(_tileSet); + + surface_set_shader(selecting_surface_tile, sh_draw_tile_map, true, BLEND.over); + shader_set_2("dimension", [ _sel_sw, _sel_sh ]); + shader_set_2("tileSize", _tileSiz); + shader_set_2("tileAmo", [ floor(_tileSetDim[0] / _tileSiz[0]), floor(_tileSetDim[1] / _tileSiz[1]) ]); + + shader_set_surface("tileTexture", _tileSet); + shader_set_2("tileTextureDim", _tileSetDim); + + shader_set_surface("indexTexture", selecting_surface); + shader_set_2("indexTextureDim", surface_get_dimension(selecting_surface)); + + draw_empty(); + surface_reset_shader(); + + var _sy = _ty + ui(8); + var _ss = (_th - ui(16)) / _sel_sh; + var _sw = _ss * _sel_sw; + var _sh = _ss * _sel_sh; + + draw_surface_ext(selecting_surface_tile, _sx, _sy, _ss, _ss, 0, c_white, 1); + + var _shov = _hover && point_in_rectangle(_m[0], _m[1], _sx, _sy, _sx + _sw, _sy + _sh); + var cc = _shov? COLORS._main_icon_light : COLORS._main_icon; + if(v == brush.brush_varient) + cc = COLORS._main_accent; + + draw_set_color(cc); + draw_rectangle(_sx, _sy, _sx + _sw, _sy + _sh, true); + + if(_shov && mouse_press(mb_left, _focus)) + brush.brush_varient = brush.brush_varient == _variences[v]? 0 : _variences[v]; + + _sx += _sw + ui(8); + } + #endregion + return _h; }); #endregion @@ -240,20 +339,257 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou #region ++++ auto tile ++++ autotiles = []; - autotile_selecting = 0; + autotile_selecting = noone; + autotile_selector_h = 0; + + autotile_subtile_selecting = noone; autotile_selector = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { - var _hh = 0; + var _yy = _y; + var _h = 0; + + var _tileSet = array_safe_get(current_data, 0); + var _tileSiz = array_safe_get(current_data, 2); + + if(!is_surface(_tileSet)) return _h; + var _tdim = surface_get_dimension(_tileSet); + var _tileAmo = [ floor(_tdim[0] / _tileSiz[0]), floor(_tdim[1] / _tileSiz[1]) ]; + + var bx = _x; + var by = _yy; + var bs = ui(24); + var _brush_tiles = brush.brush_width * brush.brush_height; + var _fromSel = (_brush_tiles == 9 || _brush_tiles == 15 || _brush_tiles == 48 || _brush_tiles == 55); + + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, _fromSel? "New autotile from selection" : "New autotile", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + var _new_at = noone; + + if(_brush_tiles == 9) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.box9, array_spread(brush.brush_indices)); + else if(_brush_tiles == 15) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.side15, array_spread(brush.brush_indices)); + else if(_brush_tiles == 48) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.top48, array_spread(brush.brush_indices)); + else if(_brush_tiles == 55) _new_at = new tiler_brush_autotile(AUTOTILE_TYPE.top55, array_spread(brush.brush_indices)); + + if(_new_at != noone) { + autotile_selecting = array_length(autotiles); + array_push(autotiles, _new_at); + + brush.brush_indices = [[ _new_at.index[0] ]]; + brush.brush_width = 1; + brush.brush_height = 1; + } + } + + _h += bs + ui(8); + _yy += bs + ui(8); + + var _pd = ui(4); + var _ah = _pd * 2; + var del = -1; + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, autotile_selector_h, COLORS.node_composite_bg_blend, 1); + + _yy += _pd; + + for( var i = 0, n = array_length(autotiles); i < n; i++ ) { + var _hg = ui(32); + var _at = autotiles[i]; + + var _pw = ui(24); + var _ph = ui(24); + var _px = _x + ui(8); + var _py = _yy + ui(4); + + var _prin = array_safe_get(_at.index, 0, noone); + + if(_prin == noone) { + draw_set_color(COLORS._main_icon); + draw_rectangle(_px, _py, _px + _pw, _py + _ph, true); + } else { + var _prc = safe_mod(_prin, _tileAmo[0]); + var _prr = floor(_prin / _tileAmo[0]); + + var _pr_tx = _prc * _tileSiz[0]; + var _pr_ty = _prr * _tileSiz[1]; + + var _pr_sx = _pw / _tileSiz[0]; + var _pr_sy = _ph / _tileSiz[1]; + + draw_surface_part_ext(_tileSet, _pr_tx, _pr_ty, _tileSiz[0], _tileSiz[1], _px, _py, _pr_sx, _pr_sy, c_white, 1); + } + + var _tx = _px + _pw + ui(8); + var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + _hg - 1); + var _cc = i == autotile_selecting? COLORS._main_accent : (_hov? COLORS._main_text : COLORS._main_text_sub); + + if(renaming == _at) { + tb_rename.setFocusHover(_focus, _hover); + tb_rename.draw(_tx, _yy, _w - _pw - ui(8), _hg, rename_text, _m); + + } else { + draw_set_text(f_p2, fa_left, fa_center, _cc); + draw_text_add(_tx, _yy + _hg / 2, _at.name); + + var bs = ui(24); + var bx = _w - bs; + var by = _yy + _hg / 2 - bs / 2; + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + del = i; + } + + if(_hov && _m[0] < _x + _w - ui(32)) { + if(DOUBLE_CLICK && _focus) { + renaming = _at; + rename_text = _at.name; + + tb_rename._current_text = _at.name; + tb_rename.activate(); + + } else if(mouse_press(mb_left, _focus)) { + if(_m[0] > _tx) { + autotile_selecting = autotile_selecting == i? noone : i; + brush.brush_indices = [[ _prin ]]; + brush.brush_width = 1; + brush.brush_height = 1; + + } else { + _at.open = !_at.open; + } + } + } + + _yy += _hg; + _ah += _hg; + + if(_at.open) { + _yy += ui(4); + _ah += ui(4); + + var _atIdx = _at.index; + var _coll = floor(_w - ui(16)) / _tileSiz[0]; + + switch(_at.type) { + case AUTOTILE_TYPE.box9 : _coll = 3; break; + case AUTOTILE_TYPE.side15 : _coll = 5; break; + case AUTOTILE_TYPE.top48 : _coll = 8; break; + case AUTOTILE_TYPE.top55 : _coll = 11; break; + } + + var _roww = ceil(array_length(_atIdx) / _coll); + + var _pre_sx = _x + ui(8); + var _pre_sy = _yy; + var _pre_sw = _coll * _tileSiz[0]; + var _pre_sh = _roww * _tileSiz[1]; + + var _ss = (_w - ui(16)) / _pre_sw; + + var _bw = power(2, ceil(log2(_coll))); + var _bh = power(2, ceil(log2(_roww))); + + _at.preview_surface = surface_verify(_at.preview_surface, _bw, _bh, surface_rgba16float); + _at.preview_surface_tile = surface_verify(_at.preview_surface_tile, _pre_sw, _pre_sh); + + surface_set_shader(_at.preview_surface, sh_draw_tile_brush, true, BLEND.over); + for( var j = 0, m = array_length(_atIdx); j < m; j++ ) { + var _til_row = floor(j / _coll); + var _til_col = j % _coll; + + var _bindex = _atIdx[j]; + shader_set_f("index", _bindex); + shader_set_f("varient", 0); + draw_point(_til_col, _til_row); + } + surface_reset_shader(); + + var _tileSetDim = surface_get_dimension(_tileSet); + + surface_set_shader(_at.preview_surface_tile, sh_draw_tile_map, true, BLEND.over); + shader_set_2("dimension", surface_get_dimension(_at.preview_surface_tile)); + shader_set_2("tileSize", _tileSiz); + shader_set_2("tileAmo", [ floor(_tileSetDim[0] / _tileSiz[0]), floor(_tileSetDim[1] / _tileSiz[1]) ]); + + shader_set_surface("tileTexture", _tileSet); + shader_set_2("tileTextureDim", _tileSetDim); + + shader_set_surface("indexTexture", _at.preview_surface); + shader_set_2("indexTextureDim", surface_get_dimension(_at.preview_surface)); + + draw_empty(); + surface_reset_shader(); + + draw_surface_ext(_at.preview_surface_tile, _pre_sx, _pre_sy, _ss, _ss, 0, c_white, 1); + + draw_set_color(COLORS._main_icon); + draw_rectangle(_pre_sx, _pre_sy, _pre_sx + _pre_sw * _ss, _pre_sy + _pre_sh * _ss, true); + + var _dtile_w = _tileSiz[0] * _ss; + var _dtile_h = _tileSiz[1] * _ss; + + if(_hover && point_in_rectangle(_m[0], _m[1], _pre_sx, _pre_sy, _pre_sx + _pre_sw * _ss, _pre_sy + _pre_sh * _ss)) { + var _at_cx = clamp(floor((_m[0] - _pre_sx) / _dtile_w), 0, _coll - 1); + var _at_cy = clamp(floor((_m[1] - _pre_sy) / _dtile_h), 0, _roww - 1); + + var _at_id = _at_cy * _coll + _at_cx; + if(_at_id >= 0 && _at_id < array_length(_atIdx)) { + var _at_c_sx = _pre_sx + _at_cx * _dtile_w; + var _at_c_sy = _pre_sy + _at_cy * _dtile_h; + + draw_set_color(COLORS._main_icon_light); + draw_rectangle(_at_c_sx, _at_c_sy, _at_c_sx + _dtile_w, _at_c_sy + _dtile_h, true); + + if(mouse_press(mb_left, _focus)) { + autotile_selecting = i; + autotile_subtile_selecting = autotile_subtile_selecting == _at_id? noone : _at_id; + } + + if(mouse_press(mb_right, _focus)) + _at.index[_at_id] = -1; + } + } + + if(autotile_selecting == i && autotile_subtile_selecting != noone) { + var _at_sl_x = autotile_subtile_selecting % _coll; + var _at_sl_y = floor(autotile_subtile_selecting / _coll); + + var _at_c_sx = _pre_sx + _at_sl_x * _dtile_w; + var _at_c_sy = _pre_sy + _at_sl_y * _dtile_h; + + draw_set_color(COLORS._main_accent); + draw_rectangle(_at_c_sx, _at_c_sy, _at_c_sx + _dtile_w, _at_c_sy + _dtile_h, true); + } + + _yy += _pre_sh * _ss + ui(4); + _ah += _pre_sh * _ss + ui(4); + + } + } + + if(del != -1) { + array_delete(autotiles, del, 1); + autotile_selecting = noone; + } + + autotile_selector_h = _ah; + return _h + _ah; + }); + #endregion + + #region ++++ brush palette ++++ + brush_palette = surface_create(1, 1, surface_rgba16float); + + palette_viewer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { + var _h = 0; - return _hh; + return _h; }); #endregion input_display_list = [ - ["Tileset", false], 0, 2, - ["Map", false], 1, - ["Tiles", false], tile_selector, - ["Autotiles",false], autotile_selector, + ["Tileset", false], 0, 2, + ["Map", false], 1, + ["Tiles", false], tile_selector, + ["Autotiles", false], autotile_selector, + ["Palette", false], palette_viewer ] newOutput(0, nodeValue_Output("Tile output", self, VALUE_TYPE.surface, noone)); @@ -264,10 +600,10 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setArrayDepth(1); #region ++++ data ++++ - canvas_surface = surface_create_empty(1, 1, surface_r16float); + canvas_surface = surface_create_empty(1, 1, surface_rgba16float); canvas_buffer = buffer_create(1 * 1 * 2, buffer_grow, 2); - drawing_surface = surface_create_empty(1, 1, surface_r16float); + drawing_surface = noone; draw_stack = ds_list_create(); preview_drawing_tile = surface_create_empty(1, 1); @@ -325,11 +661,11 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setSetting(tool_size) .setToolObject(tool_eraser), - new NodeTool( "Rectangle", [ THEME.canvas_tools_rect, THEME.canvas_tools_rect_fill ]) + new NodeTool( "Rectangle", [ THEME.canvas_tools_rect_fill ]) .setSetting(tool_size) .setToolObject(tool_rectangle), - new NodeTool( "Ellipse", [ THEME.canvas_tools_ellip, THEME.canvas_tools_ellip_fill ]) + new NodeTool( "Ellipse", [ THEME.canvas_tools_ellip_fill ]) .setSetting(tool_size) .setToolObject(tool_ellipse), @@ -340,7 +676,7 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou #endregion function apply_draw_surface() { - if(!is_surface(canvas_surface)) return; + if(!is_surface(canvas_surface)) return; if(!is_surface(drawing_surface)) return; if(selecting) { @@ -358,14 +694,22 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou triggerRender(); } + function reset_surface(surface) { + surface_set_shader(surface, noone, true, BLEND.over); + draw_surface(canvas_surface, 0, 0); + surface_reset_shader(); + } + static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { var _tileSet = current_data[0]; var _mapSize = current_data[1]; var _tileSize = current_data[2]; - if(!is_surface(drawing_surface)) { - drawing_surface = surface_verify(drawing_surface, _mapSize[0], _mapSize[1], surface_r16float); + canvas_surface = surface_verify(canvas_surface, _mapSize[0], _mapSize[1], surface_rgba16float); + if(!surface_valid(drawing_surface, _mapSize[0], _mapSize[1], surface_rgba16float)) { + drawing_surface = surface_verify(drawing_surface, _mapSize[0], _mapSize[1], surface_rgba16float); + surface_set_shader(drawing_surface, noone, true, BLEND.over); draw_surface(canvas_surface, 0, 0); surface_reset_shader(); @@ -375,7 +719,7 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _dim = attributes.dimension; var _outDim = [ _tileSize[0] * _dim[0], _tileSize[1] * _dim[1] ]; - preview_draw_overlay = surface_verify(preview_draw_overlay, _dim[0], _dim[1], surface_r16float); + preview_draw_overlay = surface_verify(preview_draw_overlay, _dim[0], _dim[1], surface_rgba16float); preview_drawing_tile = surface_verify(preview_drawing_tile, _dim[0] * _tileSize[0], _dim[1] * _tileSize[1]); preview_draw_overlay_tile = surface_verify(preview_draw_overlay_tile, _dim[0] * _tileSize[0], _dim[1] * _tileSize[1]); @@ -393,7 +737,7 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _tool = _currTool == noone? noone : _currTool.getToolObject(); brush.brush_size = tool_attribute.size; - brush.autotiler = autotile_selecting == noone? noone : autotiles[autotile_selecting]; + brush.autotiler = autotile_selecting == noone? noone : array_safe_get(autotiles, autotile_selecting, noone); if(_tool) { _tool.subtool = _currTool.selecting; @@ -477,7 +821,10 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou #endregion - if(autotiles[0].mask_surface) draw_surface_ext(autotiles[0].mask_surface, 32, 32, 8, 8, 0, c_white, 1); + //if(!array_empty(autotiles)) draw_surface_ext(autotiles[0].mask_surface, 32, 32, 8, 8, 0, c_white, 1); + // draw_surface_ext(canvas_surface, 32, 32, 8, 8, 0, c_white, 1); + // draw_surface_ext(drawing_surface, 232, 32, 8, 8, 0, c_white, 1); + // draw_surface_ext(preview_draw_overlay, 432, 32, 8, 8, 0, c_white, 1); } static processData = function(_outData, _data, _output_index, _array_index) { @@ -488,12 +835,14 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attributes.dimension[0] = _mapSize[0]; attributes.dimension[1] = _mapSize[1]; + //print($"{canvas_surface} [{is_surface(canvas_surface)}] : {drawing_surface} [{is_surface(drawing_surface)}]"); + if(!is_surface(canvas_surface) && buffer_exists(canvas_buffer)) { - canvas_surface = surface_create(_mapSize[0], _mapSize[1], surface_r16float); + canvas_surface = surface_create(_mapSize[0], _mapSize[1], surface_rgba16float); buffer_set_surface(canvas_buffer, canvas_surface, 0); } else - canvas_surface = surface_verify(canvas_surface, _mapSize[0], _mapSize[1], surface_r16float); - drawing_surface = surface_verify(drawing_surface, _mapSize[0], _mapSize[1], surface_r16float); + canvas_surface = surface_verify(canvas_surface, _mapSize[0], _mapSize[1], surface_rgba16float); + drawing_surface = surface_verify(drawing_surface, _mapSize[0], _mapSize[1], surface_rgba16float); surface_set_shader(drawing_surface, noone, true, BLEND.over); draw_surface(canvas_surface, 0, 0); @@ -508,7 +857,7 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _outDim = [ _tileSize[0] * _mapSize[0], _tileSize[1] * _mapSize[1] ]; _tileOut = surface_verify(_tileOut, _outDim[0], _outDim[1]); - _tileMap = surface_verify(_tileMap, _mapSize[0], _mapSize[1], surface_r16float); + _tileMap = surface_verify(_tileMap, _mapSize[0], _mapSize[1], surface_rgba16float); _arrIndx = array_verify(_arrIndx, _mapSize[0] * _mapSize[1]); buffer_resize(canvas_buffer, _mapSize[0] * _mapSize[1] * 2); @@ -548,11 +897,41 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou static doApplyDeserialize = function() { canvas_buffer = buffer_deserialize(load_map.surface); - canvas_surface = surface_verify(canvas_surface, attributes.dimension[0], attributes.dimension[1], surface_r16float); - drawing_surface = surface_verify(drawing_surface, attributes.dimension[0], attributes.dimension[1], surface_r16float); + canvas_surface = surface_verify(canvas_surface, attributes.dimension[0], attributes.dimension[1], surface_rgba16float); + drawing_surface = surface_verify(drawing_surface, attributes.dimension[0], attributes.dimension[1], surface_rgba16float); buffer_set_surface(canvas_buffer, canvas_surface, 0); buffer_set_surface(canvas_buffer, drawing_surface, 0); } + static attributeSerialize = function() { + var _attr = { + autotiles, + canvas: buffer_from_surface(canvas_surface), + palette: buffer_from_surface(brush_palette), + }; + + return _attr; + } + + static attributeDeserialize = function(attr) { + var _auto = struct_try_get(attr, "autotiles", []); + var _canv = struct_try_get(attr, "canvas", noone); + var _palt = struct_try_get(attr, "palette", noone); + + for( var i = 0, n = array_length(_auto); i < n; i++ ) { + autotiles[i] = new tiler_brush_autotile(_auto[i].type, _auto[i].index); + autotiles[i].name = _auto[i].name; + } + + if(_canv) { + surface_free_safe(canvas_surface); + canvas_surface = surface_from_buffer(_canv); + } + + if(_palt) { + surface_free_safe(brush_palette); + brush_palette = surface_from_buffer(_canv); + } + } } \ No newline at end of file diff --git a/scripts/shader_functions/shader_functions.gml b/scripts/shader_functions/shader_functions.gml index 137e7f62b..1bd5c04ad 100644 --- a/scripts/shader_functions/shader_functions.gml +++ b/scripts/shader_functions/shader_functions.gml @@ -209,6 +209,7 @@ function shader_set_palette(pal, pal_uni = "palette", amo_uni = "paletteAmount", var intp = getAttribute("interpolate"); + gpu_set_tex_filter(bool(intp)); shader_set_i("interpolation", intp); shader_set_f("sampleDimension", _dim == noone? surface_get_dimension(surface) : _dim); shader_set_i("sampleMode", getAttribute("oversample")); diff --git a/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml b/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml index 41a7c1c41..b82824094 100644 --- a/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml +++ b/scripts/tiler_tool_brush_shape/tiler_tool_brush_shape.gml @@ -15,6 +15,8 @@ function tiler_tool_shape(node, _brush, _shape) : tiler_tool(node) constructor { mouse_cur_x = floor(round((_mx - _x) / _s - 0.5) / tile_size[0]); mouse_cur_y = floor(round((_my - _y) / _s - 0.5) / tile_size[1]); + var _auto = brush.autotiler; + if(mouse_holding && key_mod_press(SHIFT)) { var ww = mouse_cur_x - mouse_pre_x; var hh = mouse_cur_y - mouse_pre_y; @@ -26,16 +28,26 @@ function tiler_tool_shape(node, _brush, _shape) : tiler_tool(node) constructor { if(mouse_holding) { - surface_set_shader(drawing_surface, noone); + node.reset_surface(drawing_surface); + surface_set_target(drawing_surface); switch(shape) { - case CANVAS_TOOL_SHAPE.rectangle : tiler_draw_rect_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, subtool); break; - case CANVAS_TOOL_SHAPE.ellipse : tiler_draw_ellp_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, subtool); break; + case CANVAS_TOOL_SHAPE.rectangle : tiler_draw_rect_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, true); break; + case CANVAS_TOOL_SHAPE.ellipse : tiler_draw_ellp_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, true); break; } - surface_reset_shader(); + surface_reset_target(); + if(_auto != noone) { + _auto.drawing_start(drawing_surface, false); + switch(shape) { + case CANVAS_TOOL_SHAPE.rectangle : tiler_draw_rect_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, true); break; + case CANVAS_TOOL_SHAPE.ellipse : tiler_draw_ellp_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, true); break; + } + _auto.drawing_end(); + } + if(mouse_release(mb_left)) { - apply_draw_surface(); mouse_holding = false; + apply_draw_surface(); } } else if(mouse_press(mb_left, active)) { @@ -43,8 +55,6 @@ function tiler_tool_shape(node, _brush, _shape) : tiler_tool(node) constructor { mouse_pre_y = mouse_cur_y; mouse_holding = true; - - node.tool_pick_color(mouse_cur_x, mouse_cur_y); } } @@ -57,8 +67,8 @@ function tiler_tool_shape(node, _brush, _shape) : tiler_tool(node) constructor { } switch(shape) { - case CANVAS_TOOL_SHAPE.rectangle : tiler_draw_rect_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, subtool); break; - case CANVAS_TOOL_SHAPE.ellipse : tiler_draw_ellp_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, subtool); break; + case CANVAS_TOOL_SHAPE.rectangle : tiler_draw_rect_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, true); break; + case CANVAS_TOOL_SHAPE.ellipse : tiler_draw_ellp_brush(brush, mouse_pre_x, mouse_pre_y, mouse_cur_x, mouse_cur_y, true); break; } } diff --git a/scripts/tiler_tool_fill/tiler_tool_fill.gml b/scripts/tiler_tool_fill/tiler_tool_fill.gml index 40e780ecb..526fc8e4f 100644 --- a/scripts/tiler_tool_fill/tiler_tool_fill.gml +++ b/scripts/tiler_tool_fill/tiler_tool_fill.gml @@ -15,17 +15,25 @@ function tiler_tool_fill(node, _brush, toolAttr) : tiler_tool(node) constructor surface_w = surface_get_width(drawing_surface); surface_h = surface_get_height(drawing_surface); + var _auto = brush.autotiler; + if(mouse_press(mb_left, active) && point_in_rectangle(mouse_cur_x, mouse_cur_y, 0, 0, surface_w - 1, surface_h - 1)) { surface_set_target(drawing_surface); tiler_flood_fill_scanline(drawing_surface, mouse_cur_x, mouse_cur_y, brush, tool_attribute.fillType); surface_reset_target(); + if(_auto != noone) { + _auto.drawing_start(drawing_surface, isEraser); + tiler_flood_fill_scanline(drawing_surface, mouse_cur_x, mouse_cur_y, brush, tool_attribute.fillType); + _auto.drawing_end(); + } + apply_draw_surface(); } } } -function _tiler_ff_getPixel(_x, _y) { return round(buffer_read_at(_ff_buff, (_y * _ff_w + _x) * 2, buffer_f16)); } +function _tiler_ff_getPixel(_x, _y) { return round(buffer_read_at(_ff_buff, (_y * _ff_w + _x) * 8, buffer_f16)); } function tiler_flood_fill_scanline(_surf, _x, _y, brush, _corner = false) { if(brush.brush_height * brush.brush_width == 0) return; @@ -38,7 +46,7 @@ function tiler_flood_fill_scanline(_surf, _x, _y, brush, _corner = false) { _ff_w = surface_get_width(_surf); _ff_h = surface_get_height(_surf); - _ff_buff = buffer_create(_ff_w * _ff_h * 2, buffer_fixed, 2); + _ff_buff = buffer_create(_ff_w * _ff_h * 8, buffer_fixed, 2); buffer_get_surface(_ff_buff, _surf, 0); var x1, y1, x_start; @@ -71,7 +79,7 @@ function tiler_flood_fill_scanline(_surf, _x, _y, brush, _corner = false) { while(x1 < surface_w && colorBase == _tiler_ff_getPixel(x1, y1)) { draw_point(x1, y1); - buffer_write_at(_ff_buff, (y1 * _ff_w + x1) * 2, buffer_f16, _index); + buffer_write_at(_ff_buff, (y1 * _ff_w + x1) * 8, buffer_f16, _index); // print($"----Filling {x1}, {y1}") diff --git a/shaders/sh_2d_light/sh_2d_light.fsh_mod b/shaders/sh_2d_light/sh_2d_light.fsh_mod new file mode 100644 index 000000000..926012db7 --- /dev/null +++ b/shaders/sh_2d_light/sh_2d_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6162882+07:00 diff --git a/shaders/sh_2d_light/sh_2d_light.vsh_mod b/shaders/sh_2d_light/sh_2d_light.vsh_mod new file mode 100644 index 000000000..f5846f77f --- /dev/null +++ b/shaders/sh_2d_light/sh_2d_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6164724+07:00 diff --git a/shaders/sh_3d_depth/sh_3d_depth.fsh_mod b/shaders/sh_3d_depth/sh_3d_depth.fsh_mod new file mode 100644 index 000000000..81f17aedb --- /dev/null +++ b/shaders/sh_3d_depth/sh_3d_depth.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6169090+07:00 diff --git a/shaders/sh_3d_depth/sh_3d_depth.vsh_mod b/shaders/sh_3d_depth/sh_3d_depth.vsh_mod new file mode 100644 index 000000000..fcadaf4dc --- /dev/null +++ b/shaders/sh_3d_depth/sh_3d_depth.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6171249+07:00 diff --git a/shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.fsh_mod b/shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.fsh_mod new file mode 100644 index 000000000..68eeb580d --- /dev/null +++ b/shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6175486+07:00 diff --git a/shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.vsh_mod b/shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.vsh_mod new file mode 100644 index 000000000..008c56b86 --- /dev/null +++ b/shaders/sh_3d_extrude_corner/sh_3d_extrude_corner.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6177304+07:00 diff --git a/shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.fsh_mod b/shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.fsh_mod new file mode 100644 index 000000000..cd8927872 --- /dev/null +++ b/shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6190716+07:00 diff --git a/shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.vsh_mod b/shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.vsh_mod new file mode 100644 index 000000000..b5c1d518c --- /dev/null +++ b/shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6192756+07:00 diff --git a/shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.fsh_mod b/shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.fsh_mod new file mode 100644 index 000000000..ce0585c39 --- /dev/null +++ b/shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6181936+07:00 diff --git a/shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.vsh_mod b/shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.vsh_mod new file mode 100644 index 000000000..99c687f21 --- /dev/null +++ b/shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6186239+07:00 diff --git a/shaders/sh_BGR/sh_BGR.fsh_mod b/shaders/sh_BGR/sh_BGR.fsh_mod new file mode 100644 index 000000000..1352de477 --- /dev/null +++ b/shaders/sh_BGR/sh_BGR.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6295656+07:00 diff --git a/shaders/sh_BGR/sh_BGR.vsh_mod b/shaders/sh_BGR/sh_BGR.vsh_mod new file mode 100644 index 000000000..bd4c26442 --- /dev/null +++ b/shaders/sh_BGR/sh_BGR.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6297549+07:00 diff --git a/shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.fsh_mod b/shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.fsh_mod new file mode 100644 index 000000000..535880224 --- /dev/null +++ b/shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7597385+07:00 diff --git a/shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.vsh_mod b/shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.vsh_mod new file mode 100644 index 000000000..a7cdd1a8a --- /dev/null +++ b/shaders/sh_FLIP_draw_droplet/sh_FLIP_draw_droplet.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7599121+07:00 diff --git a/shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.fsh_mod b/shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.fsh_mod new file mode 100644 index 000000000..8b58e63ef --- /dev/null +++ b/shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7603465+07:00 diff --git a/shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.vsh_mod b/shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.vsh_mod new file mode 100644 index 000000000..e742bb1f4 --- /dev/null +++ b/shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7605191+07:00 diff --git a/shaders/sh_FXAA/sh_FXAA.fsh_mod b/shaders/sh_FXAA/sh_FXAA.fsh_mod new file mode 100644 index 000000000..1fdf77c1a --- /dev/null +++ b/shaders/sh_FXAA/sh_FXAA.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7656699+07:00 diff --git a/shaders/sh_FXAA/sh_FXAA.vsh_mod b/shaders/sh_FXAA/sh_FXAA.vsh_mod new file mode 100644 index 000000000..88f9c6b7f --- /dev/null +++ b/shaders/sh_FXAA/sh_FXAA.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7658435+07:00 diff --git a/shaders/sh_ace/sh_ace.fsh_mod b/shaders/sh_ace/sh_ace.fsh_mod new file mode 100644 index 000000000..179c88ba5 --- /dev/null +++ b/shaders/sh_ace/sh_ace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6198590+07:00 diff --git a/shaders/sh_ace/sh_ace.vsh_mod b/shaders/sh_ace/sh_ace.vsh_mod new file mode 100644 index 000000000..7b0796de4 --- /dev/null +++ b/shaders/sh_ace/sh_ace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6200728+07:00 diff --git a/shaders/sh_active_canvas_ink/sh_active_canvas_ink.fsh_mod b/shaders/sh_active_canvas_ink/sh_active_canvas_ink.fsh_mod new file mode 100644 index 000000000..a9cc98e23 --- /dev/null +++ b/shaders/sh_active_canvas_ink/sh_active_canvas_ink.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6205921+07:00 diff --git a/shaders/sh_active_canvas_ink/sh_active_canvas_ink.vsh_mod b/shaders/sh_active_canvas_ink/sh_active_canvas_ink.vsh_mod new file mode 100644 index 000000000..b15f1a2d8 --- /dev/null +++ b/shaders/sh_active_canvas_ink/sh_active_canvas_ink.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6208149+07:00 diff --git a/shaders/sh_alpha_cutoff/sh_alpha_cutoff.fsh_mod b/shaders/sh_alpha_cutoff/sh_alpha_cutoff.fsh_mod new file mode 100644 index 000000000..1f20d961f --- /dev/null +++ b/shaders/sh_alpha_cutoff/sh_alpha_cutoff.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6212598+07:00 diff --git a/shaders/sh_alpha_cutoff/sh_alpha_cutoff.vsh_mod b/shaders/sh_alpha_cutoff/sh_alpha_cutoff.vsh_mod new file mode 100644 index 000000000..ec7e2515f --- /dev/null +++ b/shaders/sh_alpha_cutoff/sh_alpha_cutoff.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6214409+07:00 diff --git a/shaders/sh_alpha_grey/sh_alpha_grey.fsh_mod b/shaders/sh_alpha_grey/sh_alpha_grey.fsh_mod new file mode 100644 index 000000000..dd60ecf01 --- /dev/null +++ b/shaders/sh_alpha_grey/sh_alpha_grey.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6227715+07:00 diff --git a/shaders/sh_alpha_grey/sh_alpha_grey.vsh_mod b/shaders/sh_alpha_grey/sh_alpha_grey.vsh_mod new file mode 100644 index 000000000..4baac5205 --- /dev/null +++ b/shaders/sh_alpha_grey/sh_alpha_grey.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6229475+07:00 diff --git a/shaders/sh_alpha_hash/sh_alpha_hash.fsh_mod b/shaders/sh_alpha_hash/sh_alpha_hash.fsh_mod new file mode 100644 index 000000000..26e95e482 --- /dev/null +++ b/shaders/sh_alpha_hash/sh_alpha_hash.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6241814+07:00 diff --git a/shaders/sh_alpha_hash/sh_alpha_hash.vsh_mod b/shaders/sh_alpha_hash/sh_alpha_hash.vsh_mod new file mode 100644 index 000000000..196584525 --- /dev/null +++ b/shaders/sh_alpha_hash/sh_alpha_hash.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6243651+07:00 diff --git a/shaders/sh_ani_noise/sh_ani_noise.fsh_mod b/shaders/sh_ani_noise/sh_ani_noise.fsh_mod new file mode 100644 index 000000000..7aedb1233 --- /dev/null +++ b/shaders/sh_ani_noise/sh_ani_noise.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6247948+07:00 diff --git a/shaders/sh_ani_noise/sh_ani_noise.vsh_mod b/shaders/sh_ani_noise/sh_ani_noise.vsh_mod new file mode 100644 index 000000000..1472acaf5 --- /dev/null +++ b/shaders/sh_ani_noise/sh_ani_noise.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6249712+07:00 diff --git a/shaders/sh_atlas/sh_atlas.fsh_mod b/shaders/sh_atlas/sh_atlas.fsh_mod new file mode 100644 index 000000000..03ee3f14d --- /dev/null +++ b/shaders/sh_atlas/sh_atlas.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6259961+07:00 diff --git a/shaders/sh_atlas/sh_atlas.vsh_mod b/shaders/sh_atlas/sh_atlas.vsh_mod new file mode 100644 index 000000000..1a9889dba --- /dev/null +++ b/shaders/sh_atlas/sh_atlas.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6261855+07:00 diff --git a/shaders/sh_atlas_scan/sh_atlas_scan.fsh_mod b/shaders/sh_atlas_scan/sh_atlas_scan.fsh_mod new file mode 100644 index 000000000..1c5fbc5a9 --- /dev/null +++ b/shaders/sh_atlas_scan/sh_atlas_scan.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6254036+07:00 diff --git a/shaders/sh_atlas_scan/sh_atlas_scan.vsh_mod b/shaders/sh_atlas_scan/sh_atlas_scan.vsh_mod new file mode 100644 index 000000000..8132d6556 --- /dev/null +++ b/shaders/sh_atlas_scan/sh_atlas_scan.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6255755+07:00 diff --git a/shaders/sh_average/sh_average.fsh_mod b/shaders/sh_average/sh_average.fsh_mod new file mode 100644 index 000000000..ed11c8b54 --- /dev/null +++ b/shaders/sh_average/sh_average.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6266469+07:00 diff --git a/shaders/sh_average/sh_average.vsh_mod b/shaders/sh_average/sh_average.vsh_mod new file mode 100644 index 000000000..9a72a6ee8 --- /dev/null +++ b/shaders/sh_average/sh_average.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6268137+07:00 diff --git a/shaders/sh_bend_arc/sh_bend_arc.fsh_mod b/shaders/sh_bend_arc/sh_bend_arc.fsh_mod new file mode 100644 index 000000000..296233ea1 --- /dev/null +++ b/shaders/sh_bend_arc/sh_bend_arc.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6272573+07:00 diff --git a/shaders/sh_bend_arc/sh_bend_arc.vsh_mod b/shaders/sh_bend_arc/sh_bend_arc.vsh_mod new file mode 100644 index 000000000..b86c91763 --- /dev/null +++ b/shaders/sh_bend_arc/sh_bend_arc.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6274145+07:00 diff --git a/shaders/sh_bevel/sh_bevel.fsh b/shaders/sh_bevel/sh_bevel.fsh index c0441f04d..8217b079d 100644 --- a/shaders/sh_bevel/sh_bevel.fsh +++ b/shaders/sh_bevel/sh_bevel.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -7,7 +25,6 @@ uniform vec2 dimension; uniform vec2 scale; uniform vec2 shift; uniform int slope; -uniform int sampleMode; uniform vec2 height; uniform int heightUseSurf; @@ -15,25 +32,6 @@ uniform sampler2D heightSurf; float bright(in vec4 col) { return (col.r + col.g + col.b) / 3. * col.a; } -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float hei = height.x; float heiMax = max(height.x, height.y); @@ -81,7 +79,7 @@ void main() { shf = vec2( cos(ang), sin(ang)) * (i * added_distance) / scale; pxs = v_vTexcoord + shf * pixelStep; - col1 = sampleTexture( pxs ); + col1 = sampleTexture( gm_BaseTexture, pxs ); _b1 = bright(col1); if(_b1 < b1) { diff --git a/shaders/sh_bevel/sh_bevel.fsh_mod b/shaders/sh_bevel/sh_bevel.fsh_mod new file mode 100644 index 000000000..684357a63 --- /dev/null +++ b/shaders/sh_bevel/sh_bevel.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6287892+07:00 diff --git a/shaders/sh_bevel/sh_bevel.vsh_mod b/shaders/sh_bevel/sh_bevel.vsh_mod new file mode 100644 index 000000000..a12a9ef6a --- /dev/null +++ b/shaders/sh_bevel/sh_bevel.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6289682+07:00 diff --git a/shaders/sh_bevel_highp/sh_bevel_highp.fsh b/shaders/sh_bevel_highp/sh_bevel_highp.fsh index 6487982a9..c5f0cf683 100644 --- a/shaders/sh_bevel_highp/sh_bevel_highp.fsh +++ b/shaders/sh_bevel_highp/sh_bevel_highp.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -7,7 +25,6 @@ uniform vec2 dimension; uniform vec2 scale; uniform vec2 shift; uniform int slope; -uniform int sampleMode; uniform vec2 height; uniform int heightUseSurf; @@ -15,25 +32,6 @@ uniform sampler2D heightSurf; float bright(in vec4 col) { return (col.r + col.g + col.b) / 3. * col.a; } -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float hei = height.x; float heiMax = max(height.x, height.y); @@ -81,7 +79,7 @@ void main() { shf = vec2( cos(ang), sin(ang)) * (i * added_distance) / scale; pxs = v_vTexcoord + shf * pixelStep; - col1 = sampleTexture( pxs ); + col1 = sampleTexture( gm_BaseTexture, pxs ); _b1 = bright(col1); if(_b1 < b1) { diff --git a/shaders/sh_bevel_highp/sh_bevel_highp.fsh_mod b/shaders/sh_bevel_highp/sh_bevel_highp.fsh_mod new file mode 100644 index 000000000..1b4909755 --- /dev/null +++ b/shaders/sh_bevel_highp/sh_bevel_highp.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6278334+07:00 diff --git a/shaders/sh_bevel_highp/sh_bevel_highp.vsh_mod b/shaders/sh_bevel_highp/sh_bevel_highp.vsh_mod new file mode 100644 index 000000000..a72116d38 --- /dev/null +++ b/shaders/sh_bevel_highp/sh_bevel_highp.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6280208+07:00 diff --git a/shaders/sh_blend_add/sh_blend_add.fsh_mod b/shaders/sh_blend_add/sh_blend_add.fsh_mod new file mode 100644 index 000000000..96c44fc6f --- /dev/null +++ b/shaders/sh_blend_add/sh_blend_add.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6311851+07:00 diff --git a/shaders/sh_blend_add/sh_blend_add.vsh_mod b/shaders/sh_blend_add/sh_blend_add.vsh_mod new file mode 100644 index 000000000..127937673 --- /dev/null +++ b/shaders/sh_blend_add/sh_blend_add.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6313489+07:00 diff --git a/shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.fsh_mod b/shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.fsh_mod new file mode 100644 index 000000000..4c2fe187e --- /dev/null +++ b/shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6302004+07:00 diff --git a/shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.vsh_mod b/shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.vsh_mod new file mode 100644 index 000000000..b579b17b2 --- /dev/null +++ b/shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6303803+07:00 diff --git a/shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.fsh_mod b/shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.fsh_mod new file mode 100644 index 000000000..d39da3b58 --- /dev/null +++ b/shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6322810+07:00 diff --git a/shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.vsh_mod b/shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.vsh_mod new file mode 100644 index 000000000..b6efa70ed --- /dev/null +++ b/shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6324546+07:00 diff --git a/shaders/sh_blend_color_burn/sh_blend_color_burn.fsh_mod b/shaders/sh_blend_color_burn/sh_blend_color_burn.fsh_mod new file mode 100644 index 000000000..f5c02b769 --- /dev/null +++ b/shaders/sh_blend_color_burn/sh_blend_color_burn.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6329414+07:00 diff --git a/shaders/sh_blend_color_burn/sh_blend_color_burn.vsh_mod b/shaders/sh_blend_color_burn/sh_blend_color_burn.vsh_mod new file mode 100644 index 000000000..9af8ca4ac --- /dev/null +++ b/shaders/sh_blend_color_burn/sh_blend_color_burn.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6331211+07:00 diff --git a/shaders/sh_blend_color_dodge/sh_blend_color_dodge.fsh_mod b/shaders/sh_blend_color_dodge/sh_blend_color_dodge.fsh_mod new file mode 100644 index 000000000..76c0d8893 --- /dev/null +++ b/shaders/sh_blend_color_dodge/sh_blend_color_dodge.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6335747+07:00 diff --git a/shaders/sh_blend_color_dodge/sh_blend_color_dodge.vsh_mod b/shaders/sh_blend_color_dodge/sh_blend_color_dodge.vsh_mod new file mode 100644 index 000000000..bf14f3665 --- /dev/null +++ b/shaders/sh_blend_color_dodge/sh_blend_color_dodge.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6337646+07:00 diff --git a/shaders/sh_blend_contrast/sh_blend_contrast.fsh_mod b/shaders/sh_blend_contrast/sh_blend_contrast.fsh_mod new file mode 100644 index 000000000..76bec2196 --- /dev/null +++ b/shaders/sh_blend_contrast/sh_blend_contrast.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6342036+07:00 diff --git a/shaders/sh_blend_contrast/sh_blend_contrast.vsh_mod b/shaders/sh_blend_contrast/sh_blend_contrast.vsh_mod new file mode 100644 index 000000000..7c0ab2276 --- /dev/null +++ b/shaders/sh_blend_contrast/sh_blend_contrast.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6344134+07:00 diff --git a/shaders/sh_blend_difference/sh_blend_difference.fsh_mod b/shaders/sh_blend_difference/sh_blend_difference.fsh_mod new file mode 100644 index 000000000..66dbfd4b4 --- /dev/null +++ b/shaders/sh_blend_difference/sh_blend_difference.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6352504+07:00 diff --git a/shaders/sh_blend_difference/sh_blend_difference.vsh_mod b/shaders/sh_blend_difference/sh_blend_difference.vsh_mod new file mode 100644 index 000000000..5e2e8c81e --- /dev/null +++ b/shaders/sh_blend_difference/sh_blend_difference.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6354844+07:00 diff --git a/shaders/sh_blend_divide/sh_blend_divide.fsh_mod b/shaders/sh_blend_divide/sh_blend_divide.fsh_mod new file mode 100644 index 000000000..4f7bdd806 --- /dev/null +++ b/shaders/sh_blend_divide/sh_blend_divide.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6365260+07:00 diff --git a/shaders/sh_blend_divide/sh_blend_divide.vsh_mod b/shaders/sh_blend_divide/sh_blend_divide.vsh_mod new file mode 100644 index 000000000..8aacf9d06 --- /dev/null +++ b/shaders/sh_blend_divide/sh_blend_divide.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6367075+07:00 diff --git a/shaders/sh_blend_edge/sh_blend_edge.fsh_mod b/shaders/sh_blend_edge/sh_blend_edge.fsh_mod new file mode 100644 index 000000000..cdd0a561f --- /dev/null +++ b/shaders/sh_blend_edge/sh_blend_edge.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6384264+07:00 diff --git a/shaders/sh_blend_edge/sh_blend_edge.vsh_mod b/shaders/sh_blend_edge/sh_blend_edge.vsh_mod new file mode 100644 index 000000000..682451ab9 --- /dev/null +++ b/shaders/sh_blend_edge/sh_blend_edge.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6386075+07:00 diff --git a/shaders/sh_blend_edge_blend/sh_blend_edge_blend.fsh_mod b/shaders/sh_blend_edge_blend/sh_blend_edge_blend.fsh_mod new file mode 100644 index 000000000..5074f4d90 --- /dev/null +++ b/shaders/sh_blend_edge_blend/sh_blend_edge_blend.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6371368+07:00 diff --git a/shaders/sh_blend_edge_blend/sh_blend_edge_blend.vsh_mod b/shaders/sh_blend_edge_blend/sh_blend_edge_blend.vsh_mod new file mode 100644 index 000000000..e20eece81 --- /dev/null +++ b/shaders/sh_blend_edge_blend/sh_blend_edge_blend.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6373006+07:00 diff --git a/shaders/sh_blend_edge_extract/sh_blend_edge_extract.fsh_mod b/shaders/sh_blend_edge_extract/sh_blend_edge_extract.fsh_mod new file mode 100644 index 000000000..0cb4ecdfa --- /dev/null +++ b/shaders/sh_blend_edge_extract/sh_blend_edge_extract.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6377496+07:00 diff --git a/shaders/sh_blend_edge_extract/sh_blend_edge_extract.vsh_mod b/shaders/sh_blend_edge_extract/sh_blend_edge_extract.vsh_mod new file mode 100644 index 000000000..fcb39c5c5 --- /dev/null +++ b/shaders/sh_blend_edge_extract/sh_blend_edge_extract.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6379252+07:00 diff --git a/shaders/sh_blend_exclusion/sh_blend_exclusion.fsh_mod b/shaders/sh_blend_exclusion/sh_blend_exclusion.fsh_mod new file mode 100644 index 000000000..1ca45445f --- /dev/null +++ b/shaders/sh_blend_exclusion/sh_blend_exclusion.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6390975+07:00 diff --git a/shaders/sh_blend_exclusion/sh_blend_exclusion.vsh_mod b/shaders/sh_blend_exclusion/sh_blend_exclusion.vsh_mod new file mode 100644 index 000000000..411a03008 --- /dev/null +++ b/shaders/sh_blend_exclusion/sh_blend_exclusion.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6392924+07:00 diff --git a/shaders/sh_blend_hard_light/sh_blend_hard_light.fsh_mod b/shaders/sh_blend_hard_light/sh_blend_hard_light.fsh_mod new file mode 100644 index 000000000..26dfd8275 --- /dev/null +++ b/shaders/sh_blend_hard_light/sh_blend_hard_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6397609+07:00 diff --git a/shaders/sh_blend_hard_light/sh_blend_hard_light.vsh_mod b/shaders/sh_blend_hard_light/sh_blend_hard_light.vsh_mod new file mode 100644 index 000000000..8bc0f1a5c --- /dev/null +++ b/shaders/sh_blend_hard_light/sh_blend_hard_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6399628+07:00 diff --git a/shaders/sh_blend_hue/sh_blend_hue.fsh_mod b/shaders/sh_blend_hue/sh_blend_hue.fsh_mod new file mode 100644 index 000000000..3677347d0 --- /dev/null +++ b/shaders/sh_blend_hue/sh_blend_hue.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6404039+07:00 diff --git a/shaders/sh_blend_hue/sh_blend_hue.vsh_mod b/shaders/sh_blend_hue/sh_blend_hue.vsh_mod new file mode 100644 index 000000000..5c06338f3 --- /dev/null +++ b/shaders/sh_blend_hue/sh_blend_hue.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6405813+07:00 diff --git a/shaders/sh_blend_linear_burn/sh_blend_linear_burn.fsh_mod b/shaders/sh_blend_linear_burn/sh_blend_linear_burn.fsh_mod new file mode 100644 index 000000000..270d6ab5d --- /dev/null +++ b/shaders/sh_blend_linear_burn/sh_blend_linear_burn.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6410000+07:00 diff --git a/shaders/sh_blend_linear_burn/sh_blend_linear_burn.vsh_mod b/shaders/sh_blend_linear_burn/sh_blend_linear_burn.vsh_mod new file mode 100644 index 000000000..78a8d2f04 --- /dev/null +++ b/shaders/sh_blend_linear_burn/sh_blend_linear_burn.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6411994+07:00 diff --git a/shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.fsh_mod b/shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.fsh_mod new file mode 100644 index 000000000..dc797adc0 --- /dev/null +++ b/shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6416873+07:00 diff --git a/shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.vsh_mod b/shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.vsh_mod new file mode 100644 index 000000000..92d817ac6 --- /dev/null +++ b/shaders/sh_blend_linear_dodge/sh_blend_linear_dodge.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6419096+07:00 diff --git a/shaders/sh_blend_linear_light/sh_blend_linear_light.fsh_mod b/shaders/sh_blend_linear_light/sh_blend_linear_light.fsh_mod new file mode 100644 index 000000000..e8394efc8 --- /dev/null +++ b/shaders/sh_blend_linear_light/sh_blend_linear_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6423720+07:00 diff --git a/shaders/sh_blend_linear_light/sh_blend_linear_light.vsh_mod b/shaders/sh_blend_linear_light/sh_blend_linear_light.vsh_mod new file mode 100644 index 000000000..c4d8da848 --- /dev/null +++ b/shaders/sh_blend_linear_light/sh_blend_linear_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6425497+07:00 diff --git a/shaders/sh_blend_luma/sh_blend_luma.fsh_mod b/shaders/sh_blend_luma/sh_blend_luma.fsh_mod new file mode 100644 index 000000000..c4f8e580c --- /dev/null +++ b/shaders/sh_blend_luma/sh_blend_luma.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6429622+07:00 diff --git a/shaders/sh_blend_luma/sh_blend_luma.vsh_mod b/shaders/sh_blend_luma/sh_blend_luma.vsh_mod new file mode 100644 index 000000000..0a5c585e1 --- /dev/null +++ b/shaders/sh_blend_luma/sh_blend_luma.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6431481+07:00 diff --git a/shaders/sh_blend_max/sh_blend_max.fsh_mod b/shaders/sh_blend_max/sh_blend_max.fsh_mod new file mode 100644 index 000000000..1e858942c --- /dev/null +++ b/shaders/sh_blend_max/sh_blend_max.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6439390+07:00 diff --git a/shaders/sh_blend_max/sh_blend_max.vsh_mod b/shaders/sh_blend_max/sh_blend_max.vsh_mod new file mode 100644 index 000000000..e7db287fd --- /dev/null +++ b/shaders/sh_blend_max/sh_blend_max.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6441087+07:00 diff --git a/shaders/sh_blend_min/sh_blend_min.fsh_mod b/shaders/sh_blend_min/sh_blend_min.fsh_mod new file mode 100644 index 000000000..022842566 --- /dev/null +++ b/shaders/sh_blend_min/sh_blend_min.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6455113+07:00 diff --git a/shaders/sh_blend_min/sh_blend_min.vsh_mod b/shaders/sh_blend_min/sh_blend_min.vsh_mod new file mode 100644 index 000000000..5b919a7da --- /dev/null +++ b/shaders/sh_blend_min/sh_blend_min.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6456782+07:00 diff --git a/shaders/sh_blend_multiply/sh_blend_multiply.fsh_mod b/shaders/sh_blend_multiply/sh_blend_multiply.fsh_mod new file mode 100644 index 000000000..78d5dfdc2 --- /dev/null +++ b/shaders/sh_blend_multiply/sh_blend_multiply.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6464658+07:00 diff --git a/shaders/sh_blend_multiply/sh_blend_multiply.vsh_mod b/shaders/sh_blend_multiply/sh_blend_multiply.vsh_mod new file mode 100644 index 000000000..f53929740 --- /dev/null +++ b/shaders/sh_blend_multiply/sh_blend_multiply.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6466477+07:00 diff --git a/shaders/sh_blend_normal/sh_blend_normal.fsh_mod b/shaders/sh_blend_normal/sh_blend_normal.fsh_mod new file mode 100644 index 000000000..9cbda812d --- /dev/null +++ b/shaders/sh_blend_normal/sh_blend_normal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6482449+07:00 diff --git a/shaders/sh_blend_normal/sh_blend_normal.vsh_mod b/shaders/sh_blend_normal/sh_blend_normal.vsh_mod new file mode 100644 index 000000000..2466f7039 --- /dev/null +++ b/shaders/sh_blend_normal/sh_blend_normal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6484708+07:00 diff --git a/shaders/sh_blend_normal_dim/sh_blend_normal_dim.fsh_mod b/shaders/sh_blend_normal_dim/sh_blend_normal_dim.fsh_mod new file mode 100644 index 000000000..0efc1a3b6 --- /dev/null +++ b/shaders/sh_blend_normal_dim/sh_blend_normal_dim.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6473988+07:00 diff --git a/shaders/sh_blend_normal_dim/sh_blend_normal_dim.vsh_mod b/shaders/sh_blend_normal_dim/sh_blend_normal_dim.vsh_mod new file mode 100644 index 000000000..1e2985164 --- /dev/null +++ b/shaders/sh_blend_normal_dim/sh_blend_normal_dim.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6475695+07:00 diff --git a/shaders/sh_blend_overlay/sh_blend_overlay.fsh_mod b/shaders/sh_blend_overlay/sh_blend_overlay.fsh_mod new file mode 100644 index 000000000..349bf5c67 --- /dev/null +++ b/shaders/sh_blend_overlay/sh_blend_overlay.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6489226+07:00 diff --git a/shaders/sh_blend_overlay/sh_blend_overlay.vsh_mod b/shaders/sh_blend_overlay/sh_blend_overlay.vsh_mod new file mode 100644 index 000000000..ef9107e89 --- /dev/null +++ b/shaders/sh_blend_overlay/sh_blend_overlay.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6491168+07:00 diff --git a/shaders/sh_blend_pin_light/sh_blend_pin_light.fsh_mod b/shaders/sh_blend_pin_light/sh_blend_pin_light.fsh_mod new file mode 100644 index 000000000..da60ac641 --- /dev/null +++ b/shaders/sh_blend_pin_light/sh_blend_pin_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6495768+07:00 diff --git a/shaders/sh_blend_pin_light/sh_blend_pin_light.vsh_mod b/shaders/sh_blend_pin_light/sh_blend_pin_light.vsh_mod new file mode 100644 index 000000000..d25943bb5 --- /dev/null +++ b/shaders/sh_blend_pin_light/sh_blend_pin_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6497676+07:00 diff --git a/shaders/sh_blend_replace/sh_blend_replace.fsh_mod b/shaders/sh_blend_replace/sh_blend_replace.fsh_mod new file mode 100644 index 000000000..1fa0042d3 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6510993+07:00 diff --git a/shaders/sh_blend_replace/sh_blend_replace.vsh_mod b/shaders/sh_blend_replace/sh_blend_replace.vsh_mod new file mode 100644 index 000000000..7494de9c6 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6512757+07:00 diff --git a/shaders/sh_blend_sat/sh_blend_sat.fsh_mod b/shaders/sh_blend_sat/sh_blend_sat.fsh_mod new file mode 100644 index 000000000..4ca999bb7 --- /dev/null +++ b/shaders/sh_blend_sat/sh_blend_sat.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6517089+07:00 diff --git a/shaders/sh_blend_sat/sh_blend_sat.vsh_mod b/shaders/sh_blend_sat/sh_blend_sat.vsh_mod new file mode 100644 index 000000000..2b97ca484 --- /dev/null +++ b/shaders/sh_blend_sat/sh_blend_sat.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6518868+07:00 diff --git a/shaders/sh_blend_screen/sh_blend_screen.fsh_mod b/shaders/sh_blend_screen/sh_blend_screen.fsh_mod new file mode 100644 index 000000000..37f86649a --- /dev/null +++ b/shaders/sh_blend_screen/sh_blend_screen.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6524820+07:00 diff --git a/shaders/sh_blend_screen/sh_blend_screen.vsh_mod b/shaders/sh_blend_screen/sh_blend_screen.vsh_mod new file mode 100644 index 000000000..3021f4325 --- /dev/null +++ b/shaders/sh_blend_screen/sh_blend_screen.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6526749+07:00 diff --git a/shaders/sh_blend_soft_light/sh_blend_soft_light.fsh_mod b/shaders/sh_blend_soft_light/sh_blend_soft_light.fsh_mod new file mode 100644 index 000000000..495c00c72 --- /dev/null +++ b/shaders/sh_blend_soft_light/sh_blend_soft_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6532937+07:00 diff --git a/shaders/sh_blend_soft_light/sh_blend_soft_light.vsh_mod b/shaders/sh_blend_soft_light/sh_blend_soft_light.vsh_mod new file mode 100644 index 000000000..2f63f70fa --- /dev/null +++ b/shaders/sh_blend_soft_light/sh_blend_soft_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6535218+07:00 diff --git a/shaders/sh_blend_subtract/sh_blend_subtract.fsh_mod b/shaders/sh_blend_subtract/sh_blend_subtract.fsh_mod new file mode 100644 index 000000000..d30eefa8f --- /dev/null +++ b/shaders/sh_blend_subtract/sh_blend_subtract.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6545352+07:00 diff --git a/shaders/sh_blend_subtract/sh_blend_subtract.vsh_mod b/shaders/sh_blend_subtract/sh_blend_subtract.vsh_mod new file mode 100644 index 000000000..4fc1fdd4b --- /dev/null +++ b/shaders/sh_blend_subtract/sh_blend_subtract.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6547926+07:00 diff --git a/shaders/sh_blend_vivid_light/sh_blend_vivid_light.fsh_mod b/shaders/sh_blend_vivid_light/sh_blend_vivid_light.fsh_mod new file mode 100644 index 000000000..2280097cf --- /dev/null +++ b/shaders/sh_blend_vivid_light/sh_blend_vivid_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6552129+07:00 diff --git a/shaders/sh_blend_vivid_light/sh_blend_vivid_light.vsh_mod b/shaders/sh_blend_vivid_light/sh_blend_vivid_light.vsh_mod new file mode 100644 index 000000000..f4ae3e7d2 --- /dev/null +++ b/shaders/sh_blend_vivid_light/sh_blend_vivid_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6554234+07:00 diff --git a/shaders/sh_blend_xor/sh_blend_xor.fsh_mod b/shaders/sh_blend_xor/sh_blend_xor.fsh_mod new file mode 100644 index 000000000..49831bcdf --- /dev/null +++ b/shaders/sh_blend_xor/sh_blend_xor.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6564679+07:00 diff --git a/shaders/sh_blend_xor/sh_blend_xor.vsh_mod b/shaders/sh_blend_xor/sh_blend_xor.vsh_mod new file mode 100644 index 000000000..e2bd7206e --- /dev/null +++ b/shaders/sh_blend_xor/sh_blend_xor.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6566294+07:00 diff --git a/shaders/sh_blink_expand/sh_blink_expand.fsh_mod b/shaders/sh_blink_expand/sh_blink_expand.fsh_mod new file mode 100644 index 000000000..01d23d075 --- /dev/null +++ b/shaders/sh_blink_expand/sh_blink_expand.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6570598+07:00 diff --git a/shaders/sh_blink_expand/sh_blink_expand.vsh_mod b/shaders/sh_blink_expand/sh_blink_expand.vsh_mod new file mode 100644 index 000000000..ec687787f --- /dev/null +++ b/shaders/sh_blink_expand/sh_blink_expand.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6572321+07:00 diff --git a/shaders/sh_blink_extract/sh_blink_extract.fsh_mod b/shaders/sh_blink_extract/sh_blink_extract.fsh_mod new file mode 100644 index 000000000..bbaae3037 --- /dev/null +++ b/shaders/sh_blink_extract/sh_blink_extract.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6576221+07:00 diff --git a/shaders/sh_blink_extract/sh_blink_extract.vsh_mod b/shaders/sh_blink_extract/sh_blink_extract.vsh_mod new file mode 100644 index 000000000..6726efea0 --- /dev/null +++ b/shaders/sh_blink_extract/sh_blink_extract.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6578132+07:00 diff --git a/shaders/sh_blink_replace/sh_blink_replace.fsh_mod b/shaders/sh_blink_replace/sh_blink_replace.fsh_mod new file mode 100644 index 000000000..e6cc69f37 --- /dev/null +++ b/shaders/sh_blink_replace/sh_blink_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6583293+07:00 diff --git a/shaders/sh_blink_replace/sh_blink_replace.vsh_mod b/shaders/sh_blink_replace/sh_blink_replace.vsh_mod new file mode 100644 index 000000000..9402e21bd --- /dev/null +++ b/shaders/sh_blink_replace/sh_blink_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6585197+07:00 diff --git a/shaders/sh_blobify/sh_blobify.fsh_mod b/shaders/sh_blobify/sh_blobify.fsh_mod new file mode 100644 index 000000000..0f8cf3a52 --- /dev/null +++ b/shaders/sh_blobify/sh_blobify.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6589823+07:00 diff --git a/shaders/sh_blobify/sh_blobify.vsh_mod b/shaders/sh_blobify/sh_blobify.vsh_mod new file mode 100644 index 000000000..13bc96954 --- /dev/null +++ b/shaders/sh_blobify/sh_blobify.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6591536+07:00 diff --git a/shaders/sh_bloom_pass/sh_bloom_pass.fsh_mod b/shaders/sh_bloom_pass/sh_bloom_pass.fsh_mod new file mode 100644 index 000000000..8b8edaded --- /dev/null +++ b/shaders/sh_bloom_pass/sh_bloom_pass.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6595820+07:00 diff --git a/shaders/sh_bloom_pass/sh_bloom_pass.vsh_mod b/shaders/sh_bloom_pass/sh_bloom_pass.vsh_mod new file mode 100644 index 000000000..b7cd3fc6a --- /dev/null +++ b/shaders/sh_bloom_pass/sh_bloom_pass.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6597776+07:00 diff --git a/shaders/sh_blur_alpha/sh_blur_alpha.fsh_mod b/shaders/sh_blur_alpha/sh_blur_alpha.fsh_mod new file mode 100644 index 000000000..d7cef9e0c --- /dev/null +++ b/shaders/sh_blur_alpha/sh_blur_alpha.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6603936+07:00 diff --git a/shaders/sh_blur_alpha/sh_blur_alpha.vsh_mod b/shaders/sh_blur_alpha/sh_blur_alpha.vsh_mod new file mode 100644 index 000000000..3ca92dafb --- /dev/null +++ b/shaders/sh_blur_alpha/sh_blur_alpha.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6605928+07:00 diff --git a/shaders/sh_blur_bokeh/sh_blur_bokeh.fsh_mod b/shaders/sh_blur_bokeh/sh_blur_bokeh.fsh_mod new file mode 100644 index 000000000..cb5bb0068 --- /dev/null +++ b/shaders/sh_blur_bokeh/sh_blur_bokeh.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6610865+07:00 diff --git a/shaders/sh_blur_bokeh/sh_blur_bokeh.vsh_mod b/shaders/sh_blur_bokeh/sh_blur_bokeh.vsh_mod new file mode 100644 index 000000000..ef517cbe3 --- /dev/null +++ b/shaders/sh_blur_bokeh/sh_blur_bokeh.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6613084+07:00 diff --git a/shaders/sh_blur_box_contrast/sh_blur_box_contrast.fsh_mod b/shaders/sh_blur_box_contrast/sh_blur_box_contrast.fsh_mod new file mode 100644 index 000000000..db3332fc0 --- /dev/null +++ b/shaders/sh_blur_box_contrast/sh_blur_box_contrast.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6617848+07:00 diff --git a/shaders/sh_blur_box_contrast/sh_blur_box_contrast.vsh_mod b/shaders/sh_blur_box_contrast/sh_blur_box_contrast.vsh_mod new file mode 100644 index 000000000..59090328e --- /dev/null +++ b/shaders/sh_blur_box_contrast/sh_blur_box_contrast.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6619766+07:00 diff --git a/shaders/sh_blur_directional/sh_blur_directional.fsh b/shaders/sh_blur_directional/sh_blur_directional.fsh index 6b3a94f7c..85666d002 100644 --- a/shaders/sh_blur_directional/sh_blur_directional.fsh +++ b/shaders/sh_blur_directional/sh_blur_directional.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -12,28 +30,8 @@ uniform vec2 strength; uniform int strengthUseSurf; uniform sampler2D strengthSurf; -uniform int sampleMode; uniform int gamma; -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.));\ - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - vec4 dirBlur(vec2 angle) { #region vec4 acc = vec4(0.); float delta = 1. / size; @@ -41,7 +39,7 @@ vec4 dirBlur(vec2 angle) { #region if(scale == 0) { for(float i = -1.0; i <= 1.0; i += delta) { - vec4 col = sampleTexture( v_vTexcoord - angle * i); + vec4 col = sampleTexture( gm_BaseTexture, v_vTexcoord - angle * i); if(gamma == 1) col.rgb = pow(col.rgb, vec3(2.2)); acc += col; @@ -52,7 +50,7 @@ vec4 dirBlur(vec2 angle) { #region acc.a /= size * 2.; } else { for(float i = 0.; i <= 1.0; i += delta) { - vec4 col = sampleTexture( v_vTexcoord - angle * i); + vec4 col = sampleTexture( gm_BaseTexture, v_vTexcoord - angle * i); if(gamma == 1) col.rgb = pow(col.rgb, vec3(2.2)); acc += col ; @@ -62,7 +60,7 @@ vec4 dirBlur(vec2 angle) { #region acc.rgb /= weight; acc.a /= size - 1.; - acc += sampleTexture( v_vTexcoord ); + acc += sampleTexture( gm_BaseTexture, v_vTexcoord ); } if(gamma == 1) acc.rgb = pow(acc.rgb, vec3(1. / 2.2)); diff --git a/shaders/sh_blur_directional/sh_blur_directional.fsh_mod b/shaders/sh_blur_directional/sh_blur_directional.fsh_mod new file mode 100644 index 000000000..9e67f2fde --- /dev/null +++ b/shaders/sh_blur_directional/sh_blur_directional.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6623919+07:00 diff --git a/shaders/sh_blur_directional/sh_blur_directional.vsh_mod b/shaders/sh_blur_directional/sh_blur_directional.vsh_mod new file mode 100644 index 000000000..4c185e5ee --- /dev/null +++ b/shaders/sh_blur_directional/sh_blur_directional.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6625635+07:00 diff --git a/shaders/sh_blur_final/sh_blur_final.fsh_mod b/shaders/sh_blur_final/sh_blur_final.fsh_mod new file mode 100644 index 000000000..be8f657e2 --- /dev/null +++ b/shaders/sh_blur_final/sh_blur_final.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6629724+07:00 diff --git a/shaders/sh_blur_final/sh_blur_final.vsh_mod b/shaders/sh_blur_final/sh_blur_final.vsh_mod new file mode 100644 index 000000000..9c9fecb6a --- /dev/null +++ b/shaders/sh_blur_final/sh_blur_final.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6631732+07:00 diff --git a/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh b/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh index f67c2e9d1..724aa20dd 100644 --- a/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh +++ b/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -7,36 +25,16 @@ uniform int horizontal; uniform float weight[128]; uniform int size; uniform float angle; -uniform int sampleMode; uniform int overrideColor; uniform vec4 overColor; uniform int gamma; -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} - float wgh = 0.; vec4 sample(in vec2 pos, in int index) { - vec4 col = sampleTexture( pos ); + vec4 col = sampleTexture( gm_BaseTexture, pos ); if(gamma == 1) col.rgb = pow(col.rgb, vec3(2.2)); col.rgb *= weight[index] * col.a; diff --git a/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh_mod b/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh_mod new file mode 100644 index 000000000..a128404b0 --- /dev/null +++ b/shaders/sh_blur_gaussian/sh_blur_gaussian.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6635949+07:00 diff --git a/shaders/sh_blur_gaussian/sh_blur_gaussian.vsh_mod b/shaders/sh_blur_gaussian/sh_blur_gaussian.vsh_mod new file mode 100644 index 000000000..173eb244a --- /dev/null +++ b/shaders/sh_blur_gaussian/sh_blur_gaussian.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6637726+07:00 diff --git a/shaders/sh_blur_path/sh_blur_path.fsh_mod b/shaders/sh_blur_path/sh_blur_path.fsh_mod new file mode 100644 index 000000000..2641014d1 --- /dev/null +++ b/shaders/sh_blur_path/sh_blur_path.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6642442+07:00 diff --git a/shaders/sh_blur_path/sh_blur_path.vsh_mod b/shaders/sh_blur_path/sh_blur_path.vsh_mod new file mode 100644 index 000000000..4b7ecc0e0 --- /dev/null +++ b/shaders/sh_blur_path/sh_blur_path.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6644276+07:00 diff --git a/shaders/sh_blur_radial/sh_blur_radial.fsh b/shaders/sh_blur_radial/sh_blur_radial.fsh index 7aab10e22..5460ee684 100644 --- a/shaders/sh_blur_radial/sh_blur_radial.fsh +++ b/shaders/sh_blur_radial/sh_blur_radial.fsh @@ -1,12 +1,99 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 center; uniform vec2 dimension; -uniform int sampleMode; uniform int gamma; uniform vec2 strength; @@ -15,99 +102,6 @@ uniform sampler2D strengthSurf; #define ITERATION 64. -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2Dintp(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float str = strength.x; float strMax = max(strength.x, strength.y); @@ -131,7 +125,7 @@ void main() { if(i > str) break; float ang = angle + i / 100.; - vec4 col = sampleTexture((pxCen + vec2(cos(ang), sin(ang)) * dist) / dimension); + vec4 col = sampleTexture( gm_BaseTexture, (pxCen + vec2(cos(ang), sin(ang)) * dist) / dimension); if(gamma == 1) col.rgb = pow(col.rgb, vec3(2.2)); diff --git a/shaders/sh_blur_radial/sh_blur_radial.fsh_mod b/shaders/sh_blur_radial/sh_blur_radial.fsh_mod new file mode 100644 index 000000000..8b578fab7 --- /dev/null +++ b/shaders/sh_blur_radial/sh_blur_radial.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6648899+07:00 diff --git a/shaders/sh_blur_radial/sh_blur_radial.vsh_mod b/shaders/sh_blur_radial/sh_blur_radial.vsh_mod new file mode 100644 index 000000000..402ada0d4 --- /dev/null +++ b/shaders/sh_blur_radial/sh_blur_radial.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6650649+07:00 diff --git a/shaders/sh_blur_shape/sh_blur_shape.fsh b/shaders/sh_blur_shape/sh_blur_shape.fsh index e3001831a..670c86d8f 100644 --- a/shaders/sh_blur_shape/sh_blur_shape.fsh +++ b/shaders/sh_blur_shape/sh_blur_shape.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -8,7 +26,6 @@ uniform vec2 blurMaskDimension; uniform int useMask; uniform sampler2D mask; -uniform int sampleMode; uniform int mode; uniform int gamma; @@ -24,27 +41,8 @@ float sampleBlurMask(vec2 pos) { #region return (m.r + m.g + m.b) / 3. * m.a; } #endregion -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { - gl_FragColor = sampleTexture( v_vTexcoord ); + gl_FragColor = sampleTexture( gm_BaseTexture, v_vTexcoord ); vec2 px = v_vTexcoord * dimension; vec2 tx = 1. / dimension; @@ -65,7 +63,7 @@ void main() { vec2 bPx = (vec2(i, j) - bdim2) * bs; if(abs(bPx.x / blurMaskDimension.x) >= .5 || abs(bPx.y / blurMaskDimension.y) >= .5) continue; - vec4 c = sampleTexture((px + bPx) * tx); + vec4 c = sampleTexture( gm_BaseTexture, (px + bPx) * tx); float b = sampleBlurMask(bPx / blurMaskDimension + 0.5); if(gamma == 1) c.rgb = pow(c.rgb, vec3(2.2)); diff --git a/shaders/sh_blur_shape/sh_blur_shape.fsh_mod b/shaders/sh_blur_shape/sh_blur_shape.fsh_mod new file mode 100644 index 000000000..befd7f34e --- /dev/null +++ b/shaders/sh_blur_shape/sh_blur_shape.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6654876+07:00 diff --git a/shaders/sh_blur_shape/sh_blur_shape.vsh_mod b/shaders/sh_blur_shape/sh_blur_shape.vsh_mod new file mode 100644 index 000000000..c72f282d5 --- /dev/null +++ b/shaders/sh_blur_shape/sh_blur_shape.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6656560+07:00 diff --git a/shaders/sh_blur_simple/sh_blur_simple.fsh b/shaders/sh_blur_simple/sh_blur_simple.fsh index 86213bd78..67fdb4e05 100644 --- a/shaders/sh_blur_simple/sh_blur_simple.fsh +++ b/shaders/sh_blur_simple/sh_blur_simple.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -6,7 +24,6 @@ uniform vec2 dimension; uniform int useMask; uniform sampler2D mask; -uniform int sampleMode; uniform int gamma; uniform int overrideColor; @@ -155,25 +172,6 @@ float sampleMask() { #region return (m.r + m.g + m.b) / 3. * m.a; } #endregion -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { #region vec4 clr = vec4(0.); float totalWeight = 0.; @@ -183,7 +181,7 @@ void main() { #region realSize *= sampleMask(); if(realSize < 1.) { - gl_FragColor = sampleTexture( v_vTexcoord ); + gl_FragColor = sampleTexture( gm_BaseTexture, v_vTexcoord ); return; } else if(realSize < 2.) realSize = 1.; @@ -196,7 +194,7 @@ void main() { #region for( float j = -cel; j <= cel; j++ ) { if(abs(i + j) >= cel * 2.) continue; - vec4 sam = sampleTexture( v_vTexcoord + vec2(i, j) * texel ); + vec4 sam = sampleTexture( gm_BaseTexture, v_vTexcoord + vec2(i, j) * texel ); if(gamma == 1) sam.rgb = pow(sam.rgb, vec3(2.2)); float wei = 1. - (abs(i) + abs(j)) / (realSize * 2.); diff --git a/shaders/sh_blur_simple/sh_blur_simple.fsh_mod b/shaders/sh_blur_simple/sh_blur_simple.fsh_mod new file mode 100644 index 000000000..21c14dbfa --- /dev/null +++ b/shaders/sh_blur_simple/sh_blur_simple.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6662142+07:00 diff --git a/shaders/sh_blur_simple/sh_blur_simple.vsh_mod b/shaders/sh_blur_simple/sh_blur_simple.vsh_mod new file mode 100644 index 000000000..324b8cebf --- /dev/null +++ b/shaders/sh_blur_simple/sh_blur_simple.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6664577+07:00 diff --git a/shaders/sh_blur_slope/sh_blur_slope.fsh b/shaders/sh_blur_slope/sh_blur_slope.fsh index 76b638776..4a5b164ed 100644 --- a/shaders/sh_blur_slope/sh_blur_slope.fsh +++ b/shaders/sh_blur_slope/sh_blur_slope.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + #define MAX_STRENGTH 64. varying vec2 v_vTexcoord; @@ -12,96 +103,11 @@ uniform vec2 strength; uniform int strengthUseSurf; uniform sampler2D strengthSurf; -uniform int sampleMode; uniform int gamma; vec2 tx; vec2 txMap; -#region /////////////// SAMPLING /////////////// - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion - -vec4 sampleTexture(sampler2D texture, vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(texture, pos); - - if(sampleMode == 0) return vec4(0.); - else if(sampleMode == 1) return texture2Dintp(texture, clamp(pos, 0., 1.)); - else if(sampleMode == 2) return texture2Dintp(texture, fract(pos)); - else if(sampleMode == 3) return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - float sampleBright(vec2 pos) { vec4 c = sampleTexture(slopeMap, pos); return (c.r + c.g + c.b) / 3.; } vec2 sampleSlope(vec2 pos) { #region diff --git a/shaders/sh_blur_slope/sh_blur_slope.fsh_mod b/shaders/sh_blur_slope/sh_blur_slope.fsh_mod new file mode 100644 index 000000000..bc1c3ebfd --- /dev/null +++ b/shaders/sh_blur_slope/sh_blur_slope.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6669819+07:00 diff --git a/shaders/sh_blur_slope/sh_blur_slope.vsh_mod b/shaders/sh_blur_slope/sh_blur_slope.vsh_mod new file mode 100644 index 000000000..0c5f6ec71 --- /dev/null +++ b/shaders/sh_blur_slope/sh_blur_slope.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6672199+07:00 diff --git a/shaders/sh_blur_zoom/sh_blur_zoom.fsh b/shaders/sh_blur_zoom/sh_blur_zoom.fsh index bcfb6ac4f..792261ba5 100644 --- a/shaders/sh_blur_zoom/sh_blur_zoom.fsh +++ b/shaders/sh_blur_zoom/sh_blur_zoom.fsh @@ -1,11 +1,25 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 center; -uniform int sampleMode; uniform int blurMode; uniform int gamma; @@ -41,25 +55,6 @@ float sampleMask() { #region return (m.r + m.g + m.b) / 3. * m.a; } #endregion -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { #region float str = strength.x; if(strengthUseSurf == 1) { @@ -83,7 +78,7 @@ void main() { #region float scale = 1.0 + ((blrStart + i) * scale_factor); vec2 pos = uv * scale + center; - vec4 col = sampleTexture(pos); + vec4 col = sampleTexture( gm_BaseTexture, pos ); if(gamma == 1) col.rgb = pow(col.rgb, vec3(2.2)); color += col; } diff --git a/shaders/sh_blur_zoom/sh_blur_zoom.fsh_mod b/shaders/sh_blur_zoom/sh_blur_zoom.fsh_mod new file mode 100644 index 000000000..28d2ee395 --- /dev/null +++ b/shaders/sh_blur_zoom/sh_blur_zoom.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6680111+07:00 diff --git a/shaders/sh_blur_zoom/sh_blur_zoom.vsh_mod b/shaders/sh_blur_zoom/sh_blur_zoom.vsh_mod new file mode 100644 index 000000000..2a0053265 --- /dev/null +++ b/shaders/sh_blur_zoom/sh_blur_zoom.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6682290+07:00 diff --git a/shaders/sh_box_pattern/sh_box_pattern.fsh_mod b/shaders/sh_box_pattern/sh_box_pattern.fsh_mod new file mode 100644 index 000000000..00082a0d9 --- /dev/null +++ b/shaders/sh_box_pattern/sh_box_pattern.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6686542+07:00 diff --git a/shaders/sh_box_pattern/sh_box_pattern.vsh_mod b/shaders/sh_box_pattern/sh_box_pattern.vsh_mod new file mode 100644 index 000000000..0492a92a6 --- /dev/null +++ b/shaders/sh_box_pattern/sh_box_pattern.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6688371+07:00 diff --git a/shaders/sh_brush_linear/sh_brush_linear.fsh_mod b/shaders/sh_brush_linear/sh_brush_linear.fsh_mod new file mode 100644 index 000000000..fbf972f42 --- /dev/null +++ b/shaders/sh_brush_linear/sh_brush_linear.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6692755+07:00 diff --git a/shaders/sh_brush_linear/sh_brush_linear.vsh_mod b/shaders/sh_brush_linear/sh_brush_linear.vsh_mod new file mode 100644 index 000000000..ffa59f670 --- /dev/null +++ b/shaders/sh_brush_linear/sh_brush_linear.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6695393+07:00 diff --git a/shaders/sh_brush_outline/sh_brush_outline.fsh_mod b/shaders/sh_brush_outline/sh_brush_outline.fsh_mod new file mode 100644 index 000000000..3739a6469 --- /dev/null +++ b/shaders/sh_brush_outline/sh_brush_outline.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-16T10:39:55.4837827+07:00 diff --git a/shaders/sh_brush_outline/sh_brush_outline.vsh_mod b/shaders/sh_brush_outline/sh_brush_outline.vsh_mod new file mode 100644 index 000000000..2f54290a3 --- /dev/null +++ b/shaders/sh_brush_outline/sh_brush_outline.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6704606+07:00 diff --git a/shaders/sh_bw/sh_bw.fsh_mod b/shaders/sh_bw/sh_bw.fsh_mod new file mode 100644 index 000000000..b0be792c2 --- /dev/null +++ b/shaders/sh_bw/sh_bw.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6709773+07:00 diff --git a/shaders/sh_bw/sh_bw.vsh_mod b/shaders/sh_bw/sh_bw.vsh_mod new file mode 100644 index 000000000..6c0de7c6c --- /dev/null +++ b/shaders/sh_bw/sh_bw.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6712750+07:00 diff --git a/shaders/sh_camera/sh_camera.fsh b/shaders/sh_camera/sh_camera.fsh index 12318cb4d..c27d6f3c4 100644 --- a/shaders/sh_camera/sh_camera.fsh +++ b/shaders/sh_camera/sh_camera.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -8,7 +26,6 @@ uniform vec2 camDimension; uniform vec2 position; uniform float zoom; -uniform int sampleMode; uniform float bokehStrength; const float GoldenAngle = 2.39996323; @@ -18,25 +35,6 @@ const float ContrastAmount = 150.0; const vec3 ContrastFactor = vec3(9.0); const float Smooth = 2.0; -vec4 sampleTexture(sampler2D samp, vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(samp, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(samp, fract(pos)); - - else if(sampleMode == 2) - return texture2D(samp, vec2(fract(pos.x), pos.y)); - - else if(sampleMode == 3) - return texture2D(samp, vec2(pos.x, fract(pos.y))); - - return vec4(0.); -} #endregion - vec4 bokeh(sampler2D tex, vec2 uv, float radius) { #region ref. sh_blur_bokeh vec3 num, weight; float alpha = 0.; @@ -55,7 +53,7 @@ vec4 bokeh(sampler2D tex, vec2 uv, float radius) { #region ref. sh_blur_bokeh vec2 offset = (rec - 1.0) * horizontalAngle; vec2 sampleUV = uv + aspect * offset; - vec4 sam = sampleTexture(tex, sampleUV); + vec4 sam = sampleTexture( tex, sampleUV ); vec3 col = sam.rgb * sam.a; // increase contrast and smooth diff --git a/shaders/sh_camera/sh_camera.fsh_mod b/shaders/sh_camera/sh_camera.fsh_mod new file mode 100644 index 000000000..3d061794a --- /dev/null +++ b/shaders/sh_camera/sh_camera.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6723051+07:00 diff --git a/shaders/sh_camera/sh_camera.vsh_mod b/shaders/sh_camera/sh_camera.vsh_mod new file mode 100644 index 000000000..be36489c6 --- /dev/null +++ b/shaders/sh_camera/sh_camera.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6724989+07:00 diff --git a/shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.fsh_mod b/shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.fsh_mod new file mode 100644 index 000000000..4639e7495 --- /dev/null +++ b/shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6729179+07:00 diff --git a/shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.vsh_mod b/shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.vsh_mod new file mode 100644 index 000000000..12a77ac58 --- /dev/null +++ b/shaders/sh_canvas_apply_draw/sh_canvas_apply_draw.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6730959+07:00 diff --git a/shaders/sh_canvas_corner/sh_canvas_corner.fsh_mod b/shaders/sh_canvas_corner/sh_canvas_corner.fsh_mod new file mode 100644 index 000000000..84b12776e --- /dev/null +++ b/shaders/sh_canvas_corner/sh_canvas_corner.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6735275+07:00 diff --git a/shaders/sh_canvas_corner/sh_canvas_corner.vsh_mod b/shaders/sh_canvas_corner/sh_canvas_corner.vsh_mod new file mode 100644 index 000000000..6d8d8856a --- /dev/null +++ b/shaders/sh_canvas_corner/sh_canvas_corner.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6737062+07:00 diff --git a/shaders/sh_canvas_extrude/sh_canvas_extrude.fsh_mod b/shaders/sh_canvas_extrude/sh_canvas_extrude.fsh_mod new file mode 100644 index 000000000..f67ec59dd --- /dev/null +++ b/shaders/sh_canvas_extrude/sh_canvas_extrude.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6741774+07:00 diff --git a/shaders/sh_canvas_extrude/sh_canvas_extrude.vsh_mod b/shaders/sh_canvas_extrude/sh_canvas_extrude.vsh_mod new file mode 100644 index 000000000..bc20d3389 --- /dev/null +++ b/shaders/sh_canvas_extrude/sh_canvas_extrude.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6743781+07:00 diff --git a/shaders/sh_canvas_inset/sh_canvas_inset.fsh_mod b/shaders/sh_canvas_inset/sh_canvas_inset.fsh_mod new file mode 100644 index 000000000..dab92f3c4 --- /dev/null +++ b/shaders/sh_canvas_inset/sh_canvas_inset.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6749046+07:00 diff --git a/shaders/sh_canvas_inset/sh_canvas_inset.vsh_mod b/shaders/sh_canvas_inset/sh_canvas_inset.vsh_mod new file mode 100644 index 000000000..fd86dee65 --- /dev/null +++ b/shaders/sh_canvas_inset/sh_canvas_inset.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6751365+07:00 diff --git a/shaders/sh_canvas_mask/sh_canvas_mask.fsh_mod b/shaders/sh_canvas_mask/sh_canvas_mask.fsh_mod new file mode 100644 index 000000000..7c0af5e31 --- /dev/null +++ b/shaders/sh_canvas_mask/sh_canvas_mask.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6755899+07:00 diff --git a/shaders/sh_canvas_mask/sh_canvas_mask.vsh_mod b/shaders/sh_canvas_mask/sh_canvas_mask.vsh_mod new file mode 100644 index 000000000..671a75637 --- /dev/null +++ b/shaders/sh_canvas_mask/sh_canvas_mask.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6757624+07:00 diff --git a/shaders/sh_canvas_skew/sh_canvas_skew.fsh_mod b/shaders/sh_canvas_skew/sh_canvas_skew.fsh_mod new file mode 100644 index 000000000..d6aa8ed3a --- /dev/null +++ b/shaders/sh_canvas_skew/sh_canvas_skew.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6761959+07:00 diff --git a/shaders/sh_canvas_skew/sh_canvas_skew.vsh_mod b/shaders/sh_canvas_skew/sh_canvas_skew.vsh_mod new file mode 100644 index 000000000..d9594e89a --- /dev/null +++ b/shaders/sh_canvas_skew/sh_canvas_skew.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6763710+07:00 diff --git a/shaders/sh_cell_noise/sh_cell_noise.fsh_mod b/shaders/sh_cell_noise/sh_cell_noise.fsh_mod new file mode 100644 index 000000000..f328d1e5a --- /dev/null +++ b/shaders/sh_cell_noise/sh_cell_noise.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6803375+07:00 diff --git a/shaders/sh_cell_noise/sh_cell_noise.vsh_mod b/shaders/sh_cell_noise/sh_cell_noise.vsh_mod new file mode 100644 index 000000000..98782fcc9 --- /dev/null +++ b/shaders/sh_cell_noise/sh_cell_noise.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6805538+07:00 diff --git a/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh_mod b/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh_mod new file mode 100644 index 000000000..3f0d3d9f5 --- /dev/null +++ b/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6768005+07:00 diff --git a/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.vsh_mod b/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.vsh_mod new file mode 100644 index 000000000..b1caacb31 --- /dev/null +++ b/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6770053+07:00 diff --git a/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh_mod b/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh_mod new file mode 100644 index 000000000..17fc00473 --- /dev/null +++ b/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6776044+07:00 diff --git a/shaders/sh_cell_noise_edge/sh_cell_noise_edge.vsh_mod b/shaders/sh_cell_noise_edge/sh_cell_noise_edge.vsh_mod new file mode 100644 index 000000000..df7d9fafe --- /dev/null +++ b/shaders/sh_cell_noise_edge/sh_cell_noise_edge.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6778711+07:00 diff --git a/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh_mod b/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh_mod new file mode 100644 index 000000000..4edee2ba4 --- /dev/null +++ b/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6786314+07:00 diff --git a/shaders/sh_cell_noise_random/sh_cell_noise_random.vsh_mod b/shaders/sh_cell_noise_random/sh_cell_noise_random.vsh_mod new file mode 100644 index 000000000..bca3bb2b6 --- /dev/null +++ b/shaders/sh_cell_noise_random/sh_cell_noise_random.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6788232+07:00 diff --git a/shaders/sh_cell_noise_round/sh_cell_noise_round.fsh_mod b/shaders/sh_cell_noise_round/sh_cell_noise_round.fsh_mod new file mode 100644 index 000000000..d3ff772db --- /dev/null +++ b/shaders/sh_cell_noise_round/sh_cell_noise_round.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6796168+07:00 diff --git a/shaders/sh_cell_noise_round/sh_cell_noise_round.vsh_mod b/shaders/sh_cell_noise_round/sh_cell_noise_round.vsh_mod new file mode 100644 index 000000000..a6c428f1e --- /dev/null +++ b/shaders/sh_cell_noise_round/sh_cell_noise_round.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6798285+07:00 diff --git a/shaders/sh_channel_A/sh_channel_A.fsh_mod b/shaders/sh_channel_A/sh_channel_A.fsh_mod new file mode 100644 index 000000000..ba3bccf62 --- /dev/null +++ b/shaders/sh_channel_A/sh_channel_A.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6820819+07:00 diff --git a/shaders/sh_channel_A/sh_channel_A.vsh_mod b/shaders/sh_channel_A/sh_channel_A.vsh_mod new file mode 100644 index 000000000..5dbcf03a8 --- /dev/null +++ b/shaders/sh_channel_A/sh_channel_A.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6822586+07:00 diff --git a/shaders/sh_channel_A_grey/sh_channel_A_grey.fsh_mod b/shaders/sh_channel_A_grey/sh_channel_A_grey.fsh_mod new file mode 100644 index 000000000..e47bc0460 --- /dev/null +++ b/shaders/sh_channel_A_grey/sh_channel_A_grey.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6810715+07:00 diff --git a/shaders/sh_channel_A_grey/sh_channel_A_grey.vsh_mod b/shaders/sh_channel_A_grey/sh_channel_A_grey.vsh_mod new file mode 100644 index 000000000..e3057d6ce --- /dev/null +++ b/shaders/sh_channel_A_grey/sh_channel_A_grey.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6812679+07:00 diff --git a/shaders/sh_channel_B/sh_channel_B.fsh_mod b/shaders/sh_channel_B/sh_channel_B.fsh_mod new file mode 100644 index 000000000..10b01bebb --- /dev/null +++ b/shaders/sh_channel_B/sh_channel_B.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6840507+07:00 diff --git a/shaders/sh_channel_B/sh_channel_B.vsh_mod b/shaders/sh_channel_B/sh_channel_B.vsh_mod new file mode 100644 index 000000000..dd505bca1 --- /dev/null +++ b/shaders/sh_channel_B/sh_channel_B.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6842347+07:00 diff --git a/shaders/sh_channel_B_grey/sh_channel_B_grey.fsh_mod b/shaders/sh_channel_B_grey/sh_channel_B_grey.fsh_mod new file mode 100644 index 000000000..442febc98 --- /dev/null +++ b/shaders/sh_channel_B_grey/sh_channel_B_grey.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6831116+07:00 diff --git a/shaders/sh_channel_B_grey/sh_channel_B_grey.vsh_mod b/shaders/sh_channel_B_grey/sh_channel_B_grey.vsh_mod new file mode 100644 index 000000000..2d060e6f5 --- /dev/null +++ b/shaders/sh_channel_B_grey/sh_channel_B_grey.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6832839+07:00 diff --git a/shaders/sh_channel_G/sh_channel_G.fsh_mod b/shaders/sh_channel_G/sh_channel_G.fsh_mod new file mode 100644 index 000000000..22d5cee3c --- /dev/null +++ b/shaders/sh_channel_G/sh_channel_G.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6857541+07:00 diff --git a/shaders/sh_channel_G/sh_channel_G.vsh_mod b/shaders/sh_channel_G/sh_channel_G.vsh_mod new file mode 100644 index 000000000..154869a83 --- /dev/null +++ b/shaders/sh_channel_G/sh_channel_G.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6859281+07:00 diff --git a/shaders/sh_channel_G_grey/sh_channel_G_grey.fsh_mod b/shaders/sh_channel_G_grey/sh_channel_G_grey.fsh_mod new file mode 100644 index 000000000..8891fc996 --- /dev/null +++ b/shaders/sh_channel_G_grey/sh_channel_G_grey.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6849394+07:00 diff --git a/shaders/sh_channel_G_grey/sh_channel_G_grey.vsh_mod b/shaders/sh_channel_G_grey/sh_channel_G_grey.vsh_mod new file mode 100644 index 000000000..e631300c8 --- /dev/null +++ b/shaders/sh_channel_G_grey/sh_channel_G_grey.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6851323+07:00 diff --git a/shaders/sh_channel_H/sh_channel_H.fsh_mod b/shaders/sh_channel_H/sh_channel_H.fsh_mod new file mode 100644 index 000000000..9a8b2f526 --- /dev/null +++ b/shaders/sh_channel_H/sh_channel_H.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6867590+07:00 diff --git a/shaders/sh_channel_H/sh_channel_H.vsh_mod b/shaders/sh_channel_H/sh_channel_H.vsh_mod new file mode 100644 index 000000000..544014864 --- /dev/null +++ b/shaders/sh_channel_H/sh_channel_H.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6869751+07:00 diff --git a/shaders/sh_channel_R/sh_channel_R.fsh_mod b/shaders/sh_channel_R/sh_channel_R.fsh_mod new file mode 100644 index 000000000..07986267c --- /dev/null +++ b/shaders/sh_channel_R/sh_channel_R.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6880200+07:00 diff --git a/shaders/sh_channel_R/sh_channel_R.vsh_mod b/shaders/sh_channel_R/sh_channel_R.vsh_mod new file mode 100644 index 000000000..3acc248a7 --- /dev/null +++ b/shaders/sh_channel_R/sh_channel_R.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6881882+07:00 diff --git a/shaders/sh_channel_R2A/sh_channel_R2A.fsh_mod b/shaders/sh_channel_R2A/sh_channel_R2A.fsh_mod new file mode 100644 index 000000000..ad75c9b5c --- /dev/null +++ b/shaders/sh_channel_R2A/sh_channel_R2A.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6885716+07:00 diff --git a/shaders/sh_channel_R2A/sh_channel_R2A.vsh_mod b/shaders/sh_channel_R2A/sh_channel_R2A.vsh_mod new file mode 100644 index 000000000..f7117e2ab --- /dev/null +++ b/shaders/sh_channel_R2A/sh_channel_R2A.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6887228+07:00 diff --git a/shaders/sh_channel_R2B/sh_channel_R2B.fsh_mod b/shaders/sh_channel_R2B/sh_channel_R2B.fsh_mod new file mode 100644 index 000000000..8ab92ea27 --- /dev/null +++ b/shaders/sh_channel_R2B/sh_channel_R2B.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6891736+07:00 diff --git a/shaders/sh_channel_R2B/sh_channel_R2B.vsh_mod b/shaders/sh_channel_R2B/sh_channel_R2B.vsh_mod new file mode 100644 index 000000000..3cbeb7043 --- /dev/null +++ b/shaders/sh_channel_R2B/sh_channel_R2B.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6893730+07:00 diff --git a/shaders/sh_channel_R2G/sh_channel_R2G.fsh_mod b/shaders/sh_channel_R2G/sh_channel_R2G.fsh_mod new file mode 100644 index 000000000..6ea13f62e --- /dev/null +++ b/shaders/sh_channel_R2G/sh_channel_R2G.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6897867+07:00 diff --git a/shaders/sh_channel_R2G/sh_channel_R2G.vsh_mod b/shaders/sh_channel_R2G/sh_channel_R2G.vsh_mod new file mode 100644 index 000000000..6e2524824 --- /dev/null +++ b/shaders/sh_channel_R2G/sh_channel_R2G.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6899902+07:00 diff --git a/shaders/sh_channel_R2R/sh_channel_R2R.fsh_mod b/shaders/sh_channel_R2R/sh_channel_R2R.fsh_mod new file mode 100644 index 000000000..a80cc895b --- /dev/null +++ b/shaders/sh_channel_R2R/sh_channel_R2R.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6904288+07:00 diff --git a/shaders/sh_channel_R2R/sh_channel_R2R.vsh_mod b/shaders/sh_channel_R2R/sh_channel_R2R.vsh_mod new file mode 100644 index 000000000..f6ab71846 --- /dev/null +++ b/shaders/sh_channel_R2R/sh_channel_R2R.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6906079+07:00 diff --git a/shaders/sh_channel_R_grey/sh_channel_R_grey.fsh_mod b/shaders/sh_channel_R_grey/sh_channel_R_grey.fsh_mod new file mode 100644 index 000000000..58c9b7c5d --- /dev/null +++ b/shaders/sh_channel_R_grey/sh_channel_R_grey.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6874329+07:00 diff --git a/shaders/sh_channel_R_grey/sh_channel_R_grey.vsh_mod b/shaders/sh_channel_R_grey/sh_channel_R_grey.vsh_mod new file mode 100644 index 000000000..1031fce57 --- /dev/null +++ b/shaders/sh_channel_R_grey/sh_channel_R_grey.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6876099+07:00 diff --git a/shaders/sh_channel_S/sh_channel_S.fsh_mod b/shaders/sh_channel_S/sh_channel_S.fsh_mod new file mode 100644 index 000000000..1dd1a602d --- /dev/null +++ b/shaders/sh_channel_S/sh_channel_S.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6910304+07:00 diff --git a/shaders/sh_channel_S/sh_channel_S.vsh_mod b/shaders/sh_channel_S/sh_channel_S.vsh_mod new file mode 100644 index 000000000..a333a9326 --- /dev/null +++ b/shaders/sh_channel_S/sh_channel_S.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6912466+07:00 diff --git a/shaders/sh_channel_V/sh_channel_V.fsh_mod b/shaders/sh_channel_V/sh_channel_V.fsh_mod new file mode 100644 index 000000000..98e75b051 --- /dev/null +++ b/shaders/sh_channel_V/sh_channel_V.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6917546+07:00 diff --git a/shaders/sh_channel_V/sh_channel_V.vsh_mod b/shaders/sh_channel_V/sh_channel_V.vsh_mod new file mode 100644 index 000000000..13ba70418 --- /dev/null +++ b/shaders/sh_channel_V/sh_channel_V.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6919308+07:00 diff --git a/shaders/sh_checkerboard/sh_checkerboard.fsh_mod b/shaders/sh_checkerboard/sh_checkerboard.fsh_mod new file mode 100644 index 000000000..dbfc3ba15 --- /dev/null +++ b/shaders/sh_checkerboard/sh_checkerboard.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6923473+07:00 diff --git a/shaders/sh_checkerboard/sh_checkerboard.vsh_mod b/shaders/sh_checkerboard/sh_checkerboard.vsh_mod new file mode 100644 index 000000000..9492f0cc6 --- /dev/null +++ b/shaders/sh_checkerboard/sh_checkerboard.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6925149+07:00 diff --git a/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh b/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh index aefecf71a..3b3f391de 100644 --- a/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh +++ b/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh @@ -1,6 +1,94 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -12,79 +100,6 @@ uniform vec2 strength; uniform int strengthUseSurf; uniform sampler2D strengthSurf; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - void main() { float str = strength.x; if(strengthUseSurf == 1) { diff --git a/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh_mod b/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh_mod new file mode 100644 index 000000000..6aadd3164 --- /dev/null +++ b/shaders/sh_chromatic_aberration/sh_chromatic_aberration.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6931297+07:00 diff --git a/shaders/sh_chromatic_aberration/sh_chromatic_aberration.vsh_mod b/shaders/sh_chromatic_aberration/sh_chromatic_aberration.vsh_mod new file mode 100644 index 000000000..bced2b0af --- /dev/null +++ b/shaders/sh_chromatic_aberration/sh_chromatic_aberration.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6932994+07:00 diff --git a/shaders/sh_clean_shape/sh_clean_shape.fsh_mod b/shaders/sh_clean_shape/sh_clean_shape.fsh_mod new file mode 100644 index 000000000..18af80660 --- /dev/null +++ b/shaders/sh_clean_shape/sh_clean_shape.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6939028+07:00 diff --git a/shaders/sh_clean_shape/sh_clean_shape.vsh_mod b/shaders/sh_clean_shape/sh_clean_shape.vsh_mod new file mode 100644 index 000000000..b426fa131 --- /dev/null +++ b/shaders/sh_clean_shape/sh_clean_shape.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6941116+07:00 diff --git a/shaders/sh_color_adjust/sh_color_adjust.fsh_mod b/shaders/sh_color_adjust/sh_color_adjust.fsh_mod new file mode 100644 index 000000000..a3fd59311 --- /dev/null +++ b/shaders/sh_color_adjust/sh_color_adjust.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6946818+07:00 diff --git a/shaders/sh_color_adjust/sh_color_adjust.vsh_mod b/shaders/sh_color_adjust/sh_color_adjust.vsh_mod new file mode 100644 index 000000000..01ef443e1 --- /dev/null +++ b/shaders/sh_color_adjust/sh_color_adjust.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6948682+07:00 diff --git a/shaders/sh_color_picker_hue/sh_color_picker_hue.fsh_mod b/shaders/sh_color_picker_hue/sh_color_picker_hue.fsh_mod new file mode 100644 index 000000000..cb235b4c2 --- /dev/null +++ b/shaders/sh_color_picker_hue/sh_color_picker_hue.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6955395+07:00 diff --git a/shaders/sh_color_picker_hue/sh_color_picker_hue.vsh_mod b/shaders/sh_color_picker_hue/sh_color_picker_hue.vsh_mod new file mode 100644 index 000000000..9a1a9153a --- /dev/null +++ b/shaders/sh_color_picker_hue/sh_color_picker_hue.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6957327+07:00 diff --git a/shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.fsh_mod b/shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.fsh_mod new file mode 100644 index 000000000..cc38d5e06 --- /dev/null +++ b/shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6961512+07:00 diff --git a/shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.vsh_mod b/shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.vsh_mod new file mode 100644 index 000000000..3e7266a32 --- /dev/null +++ b/shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6963222+07:00 diff --git a/shaders/sh_color_picker_side_value/sh_color_picker_side_value.fsh_mod b/shaders/sh_color_picker_side_value/sh_color_picker_side_value.fsh_mod new file mode 100644 index 000000000..c92aff9bd --- /dev/null +++ b/shaders/sh_color_picker_side_value/sh_color_picker_side_value.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6967249+07:00 diff --git a/shaders/sh_color_picker_side_value/sh_color_picker_side_value.vsh_mod b/shaders/sh_color_picker_side_value/sh_color_picker_side_value.vsh_mod new file mode 100644 index 000000000..ae9f5c4db --- /dev/null +++ b/shaders/sh_color_picker_side_value/sh_color_picker_side_value.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6969019+07:00 diff --git a/shaders/sh_color_picker_value/sh_color_picker_value.fsh_mod b/shaders/sh_color_picker_value/sh_color_picker_value.fsh_mod new file mode 100644 index 000000000..9ff9c9d90 --- /dev/null +++ b/shaders/sh_color_picker_value/sh_color_picker_value.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6973202+07:00 diff --git a/shaders/sh_color_picker_value/sh_color_picker_value.vsh_mod b/shaders/sh_color_picker_value/sh_color_picker_value.vsh_mod new file mode 100644 index 000000000..71394eff3 --- /dev/null +++ b/shaders/sh_color_picker_value/sh_color_picker_value.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6974984+07:00 diff --git a/shaders/sh_color_remove/sh_color_remove.fsh_mod b/shaders/sh_color_remove/sh_color_remove.fsh_mod new file mode 100644 index 000000000..4631ce8d9 --- /dev/null +++ b/shaders/sh_color_remove/sh_color_remove.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6979321+07:00 diff --git a/shaders/sh_color_remove/sh_color_remove.vsh_mod b/shaders/sh_color_remove/sh_color_remove.vsh_mod new file mode 100644 index 000000000..1eedd5e61 --- /dev/null +++ b/shaders/sh_color_remove/sh_color_remove.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6981278+07:00 diff --git a/shaders/sh_color_replace/sh_color_replace.fsh_mod b/shaders/sh_color_replace/sh_color_replace.fsh_mod new file mode 100644 index 000000000..2a54116ac --- /dev/null +++ b/shaders/sh_color_replace/sh_color_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6987049+07:00 diff --git a/shaders/sh_color_replace/sh_color_replace.vsh_mod b/shaders/sh_color_replace/sh_color_replace.vsh_mod new file mode 100644 index 000000000..2bee640b4 --- /dev/null +++ b/shaders/sh_color_replace/sh_color_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6988834+07:00 diff --git a/shaders/sh_color_select_content/sh_color_select_content.fsh_mod b/shaders/sh_color_select_content/sh_color_select_content.fsh_mod new file mode 100644 index 000000000..c1fb1da5e --- /dev/null +++ b/shaders/sh_color_select_content/sh_color_select_content.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6993855+07:00 diff --git a/shaders/sh_color_select_content/sh_color_select_content.vsh_mod b/shaders/sh_color_select_content/sh_color_select_content.vsh_mod new file mode 100644 index 000000000..8d4894364 --- /dev/null +++ b/shaders/sh_color_select_content/sh_color_select_content.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6995560+07:00 diff --git a/shaders/sh_color_select_side/sh_color_select_side.fsh_mod b/shaders/sh_color_select_side/sh_color_select_side.fsh_mod new file mode 100644 index 000000000..b8a64fea9 --- /dev/null +++ b/shaders/sh_color_select_side/sh_color_select_side.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.6999828+07:00 diff --git a/shaders/sh_color_select_side/sh_color_select_side.vsh_mod b/shaders/sh_color_select_side/sh_color_select_side.vsh_mod new file mode 100644 index 000000000..22b8e174e --- /dev/null +++ b/shaders/sh_color_select_side/sh_color_select_side.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7001716+07:00 diff --git a/shaders/sh_colorize/sh_colorize.fsh_mod b/shaders/sh_colorize/sh_colorize.fsh_mod new file mode 100644 index 000000000..bb0cd06b2 --- /dev/null +++ b/shaders/sh_colorize/sh_colorize.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7005881+07:00 diff --git a/shaders/sh_colorize/sh_colorize.vsh_mod b/shaders/sh_colorize/sh_colorize.vsh_mod new file mode 100644 index 000000000..59cbde953 --- /dev/null +++ b/shaders/sh_colorize/sh_colorize.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7007627+07:00 diff --git a/shaders/sh_colours_replace/sh_colours_replace.fsh_mod b/shaders/sh_colours_replace/sh_colours_replace.fsh_mod new file mode 100644 index 000000000..072afaece --- /dev/null +++ b/shaders/sh_colours_replace/sh_colours_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7013210+07:00 diff --git a/shaders/sh_colours_replace/sh_colours_replace.vsh_mod b/shaders/sh_colours_replace/sh_colours_replace.vsh_mod new file mode 100644 index 000000000..61970ec34 --- /dev/null +++ b/shaders/sh_colours_replace/sh_colours_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7015038+07:00 diff --git a/shaders/sh_combine_hsv/sh_combine_hsv.fsh_mod b/shaders/sh_combine_hsv/sh_combine_hsv.fsh_mod new file mode 100644 index 000000000..1dd022c14 --- /dev/null +++ b/shaders/sh_combine_hsv/sh_combine_hsv.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7019460+07:00 diff --git a/shaders/sh_combine_hsv/sh_combine_hsv.vsh_mod b/shaders/sh_combine_hsv/sh_combine_hsv.vsh_mod new file mode 100644 index 000000000..47b33e0bd --- /dev/null +++ b/shaders/sh_combine_hsv/sh_combine_hsv.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7021222+07:00 diff --git a/shaders/sh_combine_rgb/sh_combine_rgb.fsh_mod b/shaders/sh_combine_rgb/sh_combine_rgb.fsh_mod new file mode 100644 index 000000000..49cbf705e --- /dev/null +++ b/shaders/sh_combine_rgb/sh_combine_rgb.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7025465+07:00 diff --git a/shaders/sh_combine_rgb/sh_combine_rgb.vsh_mod b/shaders/sh_combine_rgb/sh_combine_rgb.vsh_mod new file mode 100644 index 000000000..0e6e9ad8f --- /dev/null +++ b/shaders/sh_combine_rgb/sh_combine_rgb.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7027736+07:00 diff --git a/shaders/sh_content_sampler/sh_content_sampler.fsh_mod b/shaders/sh_content_sampler/sh_content_sampler.fsh_mod new file mode 100644 index 000000000..b8c6b678b --- /dev/null +++ b/shaders/sh_content_sampler/sh_content_sampler.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7033252+07:00 diff --git a/shaders/sh_content_sampler/sh_content_sampler.vsh_mod b/shaders/sh_content_sampler/sh_content_sampler.vsh_mod new file mode 100644 index 000000000..4db5b25de --- /dev/null +++ b/shaders/sh_content_sampler/sh_content_sampler.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7035345+07:00 diff --git a/shaders/sh_convolution/sh_convolution.fsh b/shaders/sh_convolution/sh_convolution.fsh index 3f9e29f87..2fd08e90d 100644 --- a/shaders/sh_convolution/sh_convolution.fsh +++ b/shaders/sh_convolution/sh_convolution.fsh @@ -1,27 +1,29 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform int size; uniform vec2 dimension; uniform float kernel[256]; -uniform int sampleMode; uniform int normalized; -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) return vec4(0.); - else if(sampleMode == 1) return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - else if(sampleMode == 2) return texture2D(gm_BaseTexture, fract(pos)); - else if(sampleMode == 3) return vec4(vec3(0.), 1.); - - return vec4(0.); -} - void main() { vec2 tx = 1. / dimension; float sum = 1.; @@ -45,7 +47,7 @@ void main() { float w = kernel[index]; if(w == 0.) continue; - c += w * sampleTexture(px) / sum; + c += w * sampleTexture( gm_BaseTexture, px) / sum; } gl_FragColor = c; diff --git a/shaders/sh_convolution/sh_convolution.fsh_mod b/shaders/sh_convolution/sh_convolution.fsh_mod new file mode 100644 index 000000000..3876bd772 --- /dev/null +++ b/shaders/sh_convolution/sh_convolution.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7039868+07:00 diff --git a/shaders/sh_convolution/sh_convolution.vsh_mod b/shaders/sh_convolution/sh_convolution.vsh_mod new file mode 100644 index 000000000..193279045 --- /dev/null +++ b/shaders/sh_convolution/sh_convolution.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7041617+07:00 diff --git a/shaders/sh_coord/sh_coord.fsh_mod b/shaders/sh_coord/sh_coord.fsh_mod new file mode 100644 index 000000000..3b5a677aa --- /dev/null +++ b/shaders/sh_coord/sh_coord.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7045763+07:00 diff --git a/shaders/sh_coord/sh_coord.vsh_mod b/shaders/sh_coord/sh_coord.vsh_mod new file mode 100644 index 000000000..15b3a7528 --- /dev/null +++ b/shaders/sh_coord/sh_coord.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7047645+07:00 diff --git a/shaders/sh_corner/sh_corner.fsh_mod b/shaders/sh_corner/sh_corner.fsh_mod new file mode 100644 index 000000000..af8b42ea2 --- /dev/null +++ b/shaders/sh_corner/sh_corner.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7065090+07:00 diff --git a/shaders/sh_corner/sh_corner.vsh_mod b/shaders/sh_corner/sh_corner.vsh_mod new file mode 100644 index 000000000..0815c11d5 --- /dev/null +++ b/shaders/sh_corner/sh_corner.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7067525+07:00 diff --git a/shaders/sh_corner_erode/sh_corner_erode.fsh_mod b/shaders/sh_corner_erode/sh_corner_erode.fsh_mod new file mode 100644 index 000000000..6cafbb3b2 --- /dev/null +++ b/shaders/sh_corner_erode/sh_corner_erode.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7051723+07:00 diff --git a/shaders/sh_corner_erode/sh_corner_erode.vsh_mod b/shaders/sh_corner_erode/sh_corner_erode.vsh_mod new file mode 100644 index 000000000..44377b964 --- /dev/null +++ b/shaders/sh_corner_erode/sh_corner_erode.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7053453+07:00 diff --git a/shaders/sh_corner_iterate/sh_corner_iterate.fsh_mod b/shaders/sh_corner_iterate/sh_corner_iterate.fsh_mod new file mode 100644 index 000000000..8d3f3da69 --- /dev/null +++ b/shaders/sh_corner_iterate/sh_corner_iterate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7057631+07:00 diff --git a/shaders/sh_corner_iterate/sh_corner_iterate.vsh_mod b/shaders/sh_corner_iterate/sh_corner_iterate.vsh_mod new file mode 100644 index 000000000..0f539bfbf --- /dev/null +++ b/shaders/sh_corner_iterate/sh_corner_iterate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7059562+07:00 diff --git a/shaders/sh_cross_histogram/sh_cross_histogram.fsh_mod b/shaders/sh_cross_histogram/sh_cross_histogram.fsh_mod new file mode 100644 index 000000000..233329fe1 --- /dev/null +++ b/shaders/sh_cross_histogram/sh_cross_histogram.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7071894+07:00 diff --git a/shaders/sh_cross_histogram/sh_cross_histogram.vsh_mod b/shaders/sh_cross_histogram/sh_cross_histogram.vsh_mod new file mode 100644 index 000000000..c9d615919 --- /dev/null +++ b/shaders/sh_cross_histogram/sh_cross_histogram.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7073684+07:00 diff --git a/shaders/sh_cross_section/sh_cross_section.fsh_mod b/shaders/sh_cross_section/sh_cross_section.fsh_mod new file mode 100644 index 000000000..77b60e492 --- /dev/null +++ b/shaders/sh_cross_section/sh_cross_section.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7078180+07:00 diff --git a/shaders/sh_cross_section/sh_cross_section.vsh_mod b/shaders/sh_cross_section/sh_cross_section.vsh_mod new file mode 100644 index 000000000..1189268ad --- /dev/null +++ b/shaders/sh_cross_section/sh_cross_section.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7079970+07:00 diff --git a/shaders/sh_curve/sh_curve.fsh_mod b/shaders/sh_curve/sh_curve.fsh_mod new file mode 100644 index 000000000..ea2b9b469 --- /dev/null +++ b/shaders/sh_curve/sh_curve.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7090076+07:00 diff --git a/shaders/sh_curve/sh_curve.vsh_mod b/shaders/sh_curve/sh_curve.vsh_mod new file mode 100644 index 000000000..a50e13e43 --- /dev/null +++ b/shaders/sh_curve/sh_curve.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7091989+07:00 diff --git a/shaders/sh_curve_hsv/sh_curve_hsv.fsh_mod b/shaders/sh_curve_hsv/sh_curve_hsv.fsh_mod new file mode 100644 index 000000000..9983b157f --- /dev/null +++ b/shaders/sh_curve_hsv/sh_curve_hsv.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7084081+07:00 diff --git a/shaders/sh_curve_hsv/sh_curve_hsv.vsh_mod b/shaders/sh_curve_hsv/sh_curve_hsv.vsh_mod new file mode 100644 index 000000000..889ac71e3 --- /dev/null +++ b/shaders/sh_curve_hsv/sh_curve_hsv.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7085908+07:00 diff --git a/shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.fsh_mod b/shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.fsh_mod new file mode 100644 index 000000000..1d8dbeab7 --- /dev/null +++ b/shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7096634+07:00 diff --git a/shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.vsh_mod b/shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.vsh_mod new file mode 100644 index 000000000..dfafacb5d --- /dev/null +++ b/shaders/sh_d3d_3d_transform/sh_d3d_3d_transform.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7098630+07:00 diff --git a/shaders/sh_d3d_background/sh_d3d_background.fsh_mod b/shaders/sh_d3d_background/sh_d3d_background.fsh_mod new file mode 100644 index 000000000..511c74d8b --- /dev/null +++ b/shaders/sh_d3d_background/sh_d3d_background.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7103490+07:00 diff --git a/shaders/sh_d3d_background/sh_d3d_background.vsh_mod b/shaders/sh_d3d_background/sh_d3d_background.vsh_mod new file mode 100644 index 000000000..77fab4fc4 --- /dev/null +++ b/shaders/sh_d3d_background/sh_d3d_background.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7105463+07:00 diff --git a/shaders/sh_d3d_default/sh_d3d_default.fsh_mod b/shaders/sh_d3d_default/sh_d3d_default.fsh_mod new file mode 100644 index 000000000..a078ba867 --- /dev/null +++ b/shaders/sh_d3d_default/sh_d3d_default.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T08:31:10.4496868+07:00 diff --git a/shaders/sh_d3d_default/sh_d3d_default.vsh_mod b/shaders/sh_d3d_default/sh_d3d_default.vsh_mod new file mode 100644 index 000000000..b7704809d --- /dev/null +++ b/shaders/sh_d3d_default/sh_d3d_default.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7111841+07:00 diff --git a/shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.fsh_mod b/shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.fsh_mod new file mode 100644 index 000000000..77c249619 --- /dev/null +++ b/shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7118066+07:00 diff --git a/shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.vsh_mod b/shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.vsh_mod new file mode 100644 index 000000000..748252047 --- /dev/null +++ b/shaders/sh_d3d_extrude_extends/sh_d3d_extrude_extends.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7120159+07:00 diff --git a/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh_mod b/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh_mod new file mode 100644 index 000000000..cbd57e02b --- /dev/null +++ b/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7124540+07:00 diff --git a/shaders/sh_d3d_geometry/sh_d3d_geometry.vsh_mod b/shaders/sh_d3d_geometry/sh_d3d_geometry.vsh_mod new file mode 100644 index 000000000..b64892079 --- /dev/null +++ b/shaders/sh_d3d_geometry/sh_d3d_geometry.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7126445+07:00 diff --git a/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh_mod b/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh_mod new file mode 100644 index 000000000..c9de942b8 --- /dev/null +++ b/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7130426+07:00 diff --git a/shaders/sh_d3d_grid_view/sh_d3d_grid_view.vsh_mod b/shaders/sh_d3d_grid_view/sh_d3d_grid_view.vsh_mod new file mode 100644 index 000000000..2360094af --- /dev/null +++ b/shaders/sh_d3d_grid_view/sh_d3d_grid_view.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7131993+07:00 diff --git a/shaders/sh_d3d_normal/sh_d3d_normal.fsh_mod b/shaders/sh_d3d_normal/sh_d3d_normal.fsh_mod new file mode 100644 index 000000000..8cd761640 --- /dev/null +++ b/shaders/sh_d3d_normal/sh_d3d_normal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7143338+07:00 diff --git a/shaders/sh_d3d_normal/sh_d3d_normal.vsh_mod b/shaders/sh_d3d_normal/sh_d3d_normal.vsh_mod new file mode 100644 index 000000000..3fca174a7 --- /dev/null +++ b/shaders/sh_d3d_normal/sh_d3d_normal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7145200+07:00 diff --git a/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh_mod b/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh_mod new file mode 100644 index 000000000..25ef2d031 --- /dev/null +++ b/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7135875+07:00 diff --git a/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.vsh_mod b/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.vsh_mod new file mode 100644 index 000000000..83b81679c --- /dev/null +++ b/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7137848+07:00 diff --git a/shaders/sh_d3d_outline/sh_d3d_outline.fsh_mod b/shaders/sh_d3d_outline/sh_d3d_outline.fsh_mod new file mode 100644 index 000000000..5cd608550 --- /dev/null +++ b/shaders/sh_d3d_outline/sh_d3d_outline.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7149229+07:00 diff --git a/shaders/sh_d3d_outline/sh_d3d_outline.vsh_mod b/shaders/sh_d3d_outline/sh_d3d_outline.vsh_mod new file mode 100644 index 000000000..2be035739 --- /dev/null +++ b/shaders/sh_d3d_outline/sh_d3d_outline.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7150815+07:00 diff --git a/shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.fsh_mod b/shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.fsh_mod new file mode 100644 index 000000000..1d121f4c0 --- /dev/null +++ b/shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7155100+07:00 diff --git a/shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.vsh_mod b/shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.vsh_mod new file mode 100644 index 000000000..d65104f95 --- /dev/null +++ b/shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7156657+07:00 diff --git a/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh_mod b/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh_mod new file mode 100644 index 000000000..6d3efa078 --- /dev/null +++ b/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7160910+07:00 diff --git a/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.vsh_mod b/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.vsh_mod new file mode 100644 index 000000000..a6c279bb4 --- /dev/null +++ b/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7162742+07:00 diff --git a/shaders/sh_d3d_silhouette/sh_d3d_silhouette.fsh_mod b/shaders/sh_d3d_silhouette/sh_d3d_silhouette.fsh_mod new file mode 100644 index 000000000..6aa6232bd --- /dev/null +++ b/shaders/sh_d3d_silhouette/sh_d3d_silhouette.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7166684+07:00 diff --git a/shaders/sh_d3d_silhouette/sh_d3d_silhouette.vsh_mod b/shaders/sh_d3d_silhouette/sh_d3d_silhouette.vsh_mod new file mode 100644 index 000000000..b6f86c5fd --- /dev/null +++ b/shaders/sh_d3d_silhouette/sh_d3d_silhouette.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7168418+07:00 diff --git a/shaders/sh_d3d_ssao/sh_d3d_ssao.fsh_mod b/shaders/sh_d3d_ssao/sh_d3d_ssao.fsh_mod new file mode 100644 index 000000000..40740de0b --- /dev/null +++ b/shaders/sh_d3d_ssao/sh_d3d_ssao.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7178821+07:00 diff --git a/shaders/sh_d3d_ssao/sh_d3d_ssao.vsh_mod b/shaders/sh_d3d_ssao/sh_d3d_ssao.vsh_mod new file mode 100644 index 000000000..f04511da7 --- /dev/null +++ b/shaders/sh_d3d_ssao/sh_d3d_ssao.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7180778+07:00 diff --git a/shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.fsh_mod b/shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.fsh_mod new file mode 100644 index 000000000..14dc49acb --- /dev/null +++ b/shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7172824+07:00 diff --git a/shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.vsh_mod b/shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.vsh_mod new file mode 100644 index 000000000..0a65b695c --- /dev/null +++ b/shaders/sh_d3d_ssao_blur/sh_d3d_ssao_blur.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7174710+07:00 diff --git a/shaders/sh_d3d_wireframe/sh_d3d_wireframe.fsh_mod b/shaders/sh_d3d_wireframe/sh_d3d_wireframe.fsh_mod new file mode 100644 index 000000000..1551a8b18 --- /dev/null +++ b/shaders/sh_d3d_wireframe/sh_d3d_wireframe.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7184700+07:00 diff --git a/shaders/sh_d3d_wireframe/sh_d3d_wireframe.vsh_mod b/shaders/sh_d3d_wireframe/sh_d3d_wireframe.vsh_mod new file mode 100644 index 000000000..ba0563b0e --- /dev/null +++ b/shaders/sh_d3d_wireframe/sh_d3d_wireframe.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7186402+07:00 diff --git a/shaders/sh_de_corner/sh_de_corner.fsh_mod b/shaders/sh_de_corner/sh_de_corner.fsh_mod new file mode 100644 index 000000000..258c16de1 --- /dev/null +++ b/shaders/sh_de_corner/sh_de_corner.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7190539+07:00 diff --git a/shaders/sh_de_corner/sh_de_corner.vsh_mod b/shaders/sh_de_corner/sh_de_corner.vsh_mod new file mode 100644 index 000000000..9419810df --- /dev/null +++ b/shaders/sh_de_corner/sh_de_corner.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7192313+07:00 diff --git a/shaders/sh_de_stray/sh_de_stray.fsh_mod b/shaders/sh_de_stray/sh_de_stray.fsh_mod new file mode 100644 index 000000000..dd424a60e --- /dev/null +++ b/shaders/sh_de_stray/sh_de_stray.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7200218+07:00 diff --git a/shaders/sh_de_stray/sh_de_stray.vsh_mod b/shaders/sh_de_stray/sh_de_stray.vsh_mod new file mode 100644 index 000000000..c37bb4e8c --- /dev/null +++ b/shaders/sh_de_stray/sh_de_stray.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7202035+07:00 diff --git a/shaders/sh_default/sh_default.fsh_mod b/shaders/sh_default/sh_default.fsh_mod new file mode 100644 index 000000000..1a848d645 --- /dev/null +++ b/shaders/sh_default/sh_default.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7206698+07:00 diff --git a/shaders/sh_default/sh_default.vsh_mod b/shaders/sh_default/sh_default.vsh_mod new file mode 100644 index 000000000..f67c0b21b --- /dev/null +++ b/shaders/sh_default/sh_default.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7208622+07:00 diff --git a/shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.fsh_mod b/shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.fsh_mod new file mode 100644 index 000000000..e06ff7152 --- /dev/null +++ b/shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7213448+07:00 diff --git a/shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.vsh_mod b/shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.vsh_mod new file mode 100644 index 000000000..cf446f0ec --- /dev/null +++ b/shaders/sh_dialog_palette_selector/sh_dialog_palette_selector.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7215202+07:00 diff --git a/shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.fsh_mod b/shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.fsh_mod new file mode 100644 index 000000000..b36776e59 --- /dev/null +++ b/shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7219400+07:00 diff --git a/shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.vsh_mod b/shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.vsh_mod new file mode 100644 index 000000000..54d29c11c --- /dev/null +++ b/shaders/sh_diffuse_dissipate/sh_diffuse_dissipate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7221030+07:00 diff --git a/shaders/sh_diffuse_flow/sh_diffuse_flow.fsh_mod b/shaders/sh_diffuse_flow/sh_diffuse_flow.fsh_mod new file mode 100644 index 000000000..aa36c60d4 --- /dev/null +++ b/shaders/sh_diffuse_flow/sh_diffuse_flow.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7225195+07:00 diff --git a/shaders/sh_diffuse_flow/sh_diffuse_flow.vsh_mod b/shaders/sh_diffuse_flow/sh_diffuse_flow.vsh_mod new file mode 100644 index 000000000..c370e1523 --- /dev/null +++ b/shaders/sh_diffuse_flow/sh_diffuse_flow.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7226957+07:00 diff --git a/shaders/sh_diffuse_post/sh_diffuse_post.fsh_mod b/shaders/sh_diffuse_post/sh_diffuse_post.fsh_mod new file mode 100644 index 000000000..c0916c4d9 --- /dev/null +++ b/shaders/sh_diffuse_post/sh_diffuse_post.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7231149+07:00 diff --git a/shaders/sh_diffuse_post/sh_diffuse_post.vsh_mod b/shaders/sh_diffuse_post/sh_diffuse_post.vsh_mod new file mode 100644 index 000000000..748e69d34 --- /dev/null +++ b/shaders/sh_diffuse_post/sh_diffuse_post.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7233295+07:00 diff --git a/shaders/sh_dilate/sh_dilate.fsh b/shaders/sh_dilate/sh_dilate.fsh index ae6ae3b78..49996b697 100644 --- a/shaders/sh_dilate/sh_dilate.fsh +++ b/shaders/sh_dilate/sh_dilate.fsh @@ -1,12 +1,99 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 dimension; uniform vec2 center; -uniform int sampleMode; uniform vec2 radius; uniform int radiusUseSurf; @@ -16,98 +103,6 @@ uniform vec2 strength; uniform int strengthUseSurf; uniform sampler2D strengthSurf; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2Dintp(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float rad = radius.x; if(radiusUseSurf == 1) { @@ -128,5 +123,5 @@ void main() { vec2 tex = pixelPos + to * eff * str; tex /= dimension; - gl_FragColor = sampleTexture( tex ); + gl_FragColor = sampleTexture( gm_BaseTexture, tex ); } diff --git a/shaders/sh_dilate/sh_dilate.fsh_mod b/shaders/sh_dilate/sh_dilate.fsh_mod new file mode 100644 index 000000000..50e796d1c --- /dev/null +++ b/shaders/sh_dilate/sh_dilate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7237596+07:00 diff --git a/shaders/sh_dilate/sh_dilate.vsh_mod b/shaders/sh_dilate/sh_dilate.vsh_mod new file mode 100644 index 000000000..8e467cdbc --- /dev/null +++ b/shaders/sh_dilate/sh_dilate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7239225+07:00 diff --git a/shaders/sh_displace/sh_displace.fsh b/shaders/sh_displace/sh_displace.fsh index 84983d324..ced0f6a12 100644 --- a/shaders/sh_displace/sh_displace.fsh +++ b/shaders/sh_displace/sh_displace.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -10,7 +101,6 @@ uniform vec2 displace; uniform float middle; uniform int iterate; uniform int mode; -uniform int sampleMode; uniform int blendMode; uniform int sepAxis; @@ -20,91 +110,6 @@ uniform sampler2D strengthSurf; float bright(in vec4 col) { return dot(col.rgb, vec3(0.2126, 0.7152, 0.0722)) * col.a; } -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - - vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(gm_BaseTexture, pos); - - if(sampleMode == 0) return vec4(0.); - else if(sampleMode == 1) return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); - else if(sampleMode == 2) return texture2Dintp(gm_BaseTexture, fract(pos)); - else if(sampleMode == 3) return vec4(vec3(0.), 1.); - - return vec4(0.); - } - -#endregion /////////////// SAMPLING /////////////// - vec2 shiftMap(in vec2 pos, in float str) { #region vec2 tx = 1. / dimension; vec4 disP = texture2Dintp( map, pos ); @@ -175,7 +180,7 @@ vec4 blend(in vec4 c0, in vec4 c1) { #region void main() { #region vec2 samPos = v_vTexcoord; - vec4 ccol = sampleTexture( v_vTexcoord ), ncol; + vec4 ccol = sampleTexture( gm_BaseTexture, v_vTexcoord ), ncol; float stren = strength.x; float stMax = strength.x; @@ -190,11 +195,11 @@ void main() { #region if(i >= stren) break; samPos = shiftMap(samPos, min(1., stren - i)); - ncol = blend(ccol, sampleTexture( samPos )); + ncol = blend(ccol, sampleTexture( gm_BaseTexture, samPos )); } } else { samPos = shiftMap(samPos, stren); - ncol = sampleTexture( samPos ); + ncol = sampleTexture( gm_BaseTexture, samPos ); } gl_FragColor = blend(ccol, ncol); diff --git a/shaders/sh_displace/sh_displace.fsh_mod b/shaders/sh_displace/sh_displace.fsh_mod new file mode 100644 index 000000000..77bf30a2b --- /dev/null +++ b/shaders/sh_displace/sh_displace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7245080+07:00 diff --git a/shaders/sh_displace/sh_displace.vsh_mod b/shaders/sh_displace/sh_displace.vsh_mod new file mode 100644 index 000000000..c4f335d45 --- /dev/null +++ b/shaders/sh_displace/sh_displace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7247366+07:00 diff --git a/shaders/sh_dither/sh_dither.fsh_mod b/shaders/sh_dither/sh_dither.fsh_mod new file mode 100644 index 000000000..5b9acdabf --- /dev/null +++ b/shaders/sh_dither/sh_dither.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7262161+07:00 diff --git a/shaders/sh_dither/sh_dither.vsh_mod b/shaders/sh_dither/sh_dither.vsh_mod new file mode 100644 index 000000000..1422288db --- /dev/null +++ b/shaders/sh_dither/sh_dither.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7263900+07:00 diff --git a/shaders/sh_dither_screen/sh_dither_screen.fsh_mod b/shaders/sh_dither_screen/sh_dither_screen.fsh_mod new file mode 100644 index 000000000..62c76d9a5 --- /dev/null +++ b/shaders/sh_dither_screen/sh_dither_screen.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7254317+07:00 diff --git a/shaders/sh_dither_screen/sh_dither_screen.vsh_mod b/shaders/sh_dither_screen/sh_dither_screen.vsh_mod new file mode 100644 index 000000000..2a41dd927 --- /dev/null +++ b/shaders/sh_dither_screen/sh_dither_screen.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7256398+07:00 diff --git a/shaders/sh_downsample/sh_downsample.fsh_mod b/shaders/sh_downsample/sh_downsample.fsh_mod new file mode 100644 index 000000000..23ba783cc --- /dev/null +++ b/shaders/sh_downsample/sh_downsample.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7272968+07:00 diff --git a/shaders/sh_downsample/sh_downsample.vsh_mod b/shaders/sh_downsample/sh_downsample.vsh_mod new file mode 100644 index 000000000..abc9cea58 --- /dev/null +++ b/shaders/sh_downsample/sh_downsample.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7274685+07:00 diff --git a/shaders/sh_draw_color/sh_draw_color.fsh_mod b/shaders/sh_draw_color/sh_draw_color.fsh_mod new file mode 100644 index 000000000..509babe37 --- /dev/null +++ b/shaders/sh_draw_color/sh_draw_color.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7280313+07:00 diff --git a/shaders/sh_draw_color/sh_draw_color.vsh_mod b/shaders/sh_draw_color/sh_draw_color.vsh_mod new file mode 100644 index 000000000..6236b1020 --- /dev/null +++ b/shaders/sh_draw_color/sh_draw_color.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7282789+07:00 diff --git a/shaders/sh_draw_divide/sh_draw_divide.fsh_mod b/shaders/sh_draw_divide/sh_draw_divide.fsh_mod new file mode 100644 index 000000000..ca0ccb409 --- /dev/null +++ b/shaders/sh_draw_divide/sh_draw_divide.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7287501+07:00 diff --git a/shaders/sh_draw_divide/sh_draw_divide.vsh_mod b/shaders/sh_draw_divide/sh_draw_divide.vsh_mod new file mode 100644 index 000000000..67e7432e1 --- /dev/null +++ b/shaders/sh_draw_divide/sh_draw_divide.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7289138+07:00 diff --git a/shaders/sh_draw_downsample/sh_draw_downsample.fsh_mod b/shaders/sh_draw_downsample/sh_draw_downsample.fsh_mod new file mode 100644 index 000000000..8a6dbc904 --- /dev/null +++ b/shaders/sh_draw_downsample/sh_draw_downsample.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7294573+07:00 diff --git a/shaders/sh_draw_downsample/sh_draw_downsample.vsh_mod b/shaders/sh_draw_downsample/sh_draw_downsample.vsh_mod new file mode 100644 index 000000000..85ae56efd --- /dev/null +++ b/shaders/sh_draw_downsample/sh_draw_downsample.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7296604+07:00 diff --git a/shaders/sh_draw_flare_star/sh_draw_flare_star.fsh_mod b/shaders/sh_draw_flare_star/sh_draw_flare_star.fsh_mod new file mode 100644 index 000000000..8bb0f8dd4 --- /dev/null +++ b/shaders/sh_draw_flare_star/sh_draw_flare_star.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7301813+07:00 diff --git a/shaders/sh_draw_flare_star/sh_draw_flare_star.vsh_mod b/shaders/sh_draw_flare_star/sh_draw_flare_star.vsh_mod new file mode 100644 index 000000000..d04eb2fc2 --- /dev/null +++ b/shaders/sh_draw_flare_star/sh_draw_flare_star.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7303549+07:00 diff --git a/shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.fsh_mod b/shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.fsh_mod new file mode 100644 index 000000000..d0b818ceb --- /dev/null +++ b/shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7307776+07:00 diff --git a/shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.vsh_mod b/shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.vsh_mod new file mode 100644 index 000000000..7c61c22ec --- /dev/null +++ b/shaders/sh_draw_grey_alpha/sh_draw_grey_alpha.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7309586+07:00 diff --git a/shaders/sh_draw_mapping/sh_draw_mapping.fsh b/shaders/sh_draw_mapping/sh_draw_mapping.fsh index bf577d8d8..fa38a0276 100644 --- a/shaders/sh_draw_mapping/sh_draw_mapping.fsh +++ b/shaders/sh_draw_mapping/sh_draw_mapping.fsh @@ -1,6 +1,94 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -8,79 +96,6 @@ uniform vec2 position; uniform float rotation; uniform vec2 scale; -/////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -/////////////// SAMPLING /////////////// - void main() { vec2 cpos = v_vTexcoord.yx - vec2(0.5); vec2 pos; diff --git a/shaders/sh_draw_mapping/sh_draw_mapping.fsh_mod b/shaders/sh_draw_mapping/sh_draw_mapping.fsh_mod new file mode 100644 index 000000000..3bb4da941 --- /dev/null +++ b/shaders/sh_draw_mapping/sh_draw_mapping.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7314331+07:00 diff --git a/shaders/sh_draw_mapping/sh_draw_mapping.vsh_mod b/shaders/sh_draw_mapping/sh_draw_mapping.vsh_mod new file mode 100644 index 000000000..75728a32b --- /dev/null +++ b/shaders/sh_draw_mapping/sh_draw_mapping.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7316080+07:00 diff --git a/shaders/sh_draw_normal/sh_draw_normal.fsh_mod b/shaders/sh_draw_normal/sh_draw_normal.fsh_mod new file mode 100644 index 000000000..6ddeb30ba --- /dev/null +++ b/shaders/sh_draw_normal/sh_draw_normal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7320345+07:00 diff --git a/shaders/sh_draw_normal/sh_draw_normal.vsh_mod b/shaders/sh_draw_normal/sh_draw_normal.vsh_mod new file mode 100644 index 000000000..ed722b2d7 --- /dev/null +++ b/shaders/sh_draw_normal/sh_draw_normal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7322226+07:00 diff --git a/shaders/sh_draw_r16/sh_draw_r16.fsh_mod b/shaders/sh_draw_r16/sh_draw_r16.fsh_mod new file mode 100644 index 000000000..228a94370 --- /dev/null +++ b/shaders/sh_draw_r16/sh_draw_r16.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7326499+07:00 diff --git a/shaders/sh_draw_r16/sh_draw_r16.vsh_mod b/shaders/sh_draw_r16/sh_draw_r16.vsh_mod new file mode 100644 index 000000000..72b4d6e4a --- /dev/null +++ b/shaders/sh_draw_r16/sh_draw_r16.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7328183+07:00 diff --git a/shaders/sh_draw_r32/sh_draw_r32.fsh_mod b/shaders/sh_draw_r32/sh_draw_r32.fsh_mod new file mode 100644 index 000000000..abcdaf531 --- /dev/null +++ b/shaders/sh_draw_r32/sh_draw_r32.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7332561+07:00 diff --git a/shaders/sh_draw_r32/sh_draw_r32.vsh_mod b/shaders/sh_draw_r32/sh_draw_r32.vsh_mod new file mode 100644 index 000000000..e898f47b6 --- /dev/null +++ b/shaders/sh_draw_r32/sh_draw_r32.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7334312+07:00 diff --git a/shaders/sh_draw_r8/sh_draw_r8.fsh_mod b/shaders/sh_draw_r8/sh_draw_r8.fsh_mod new file mode 100644 index 000000000..6a22459f7 --- /dev/null +++ b/shaders/sh_draw_r8/sh_draw_r8.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7338829+07:00 diff --git a/shaders/sh_draw_r8/sh_draw_r8.vsh_mod b/shaders/sh_draw_r8/sh_draw_r8.vsh_mod new file mode 100644 index 000000000..2b47d9426 --- /dev/null +++ b/shaders/sh_draw_r8/sh_draw_r8.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7340569+07:00 diff --git a/shaders/sh_draw_single_channel/sh_draw_single_channel.fsh_mod b/shaders/sh_draw_single_channel/sh_draw_single_channel.fsh_mod new file mode 100644 index 000000000..534c5acfb --- /dev/null +++ b/shaders/sh_draw_single_channel/sh_draw_single_channel.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7344671+07:00 diff --git a/shaders/sh_draw_single_channel/sh_draw_single_channel.vsh_mod b/shaders/sh_draw_single_channel/sh_draw_single_channel.vsh_mod new file mode 100644 index 000000000..3556403dd --- /dev/null +++ b/shaders/sh_draw_single_channel/sh_draw_single_channel.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7346468+07:00 diff --git a/shaders/sh_draw_surface/sh_draw_surface.fsh_mod b/shaders/sh_draw_surface/sh_draw_surface.fsh_mod new file mode 100644 index 000000000..abcea40f9 --- /dev/null +++ b/shaders/sh_draw_surface/sh_draw_surface.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7358323+07:00 diff --git a/shaders/sh_draw_surface/sh_draw_surface.vsh_mod b/shaders/sh_draw_surface/sh_draw_surface.vsh_mod new file mode 100644 index 000000000..263b27a1d --- /dev/null +++ b/shaders/sh_draw_surface/sh_draw_surface.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7360424+07:00 diff --git a/shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.fsh_mod b/shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.fsh_mod new file mode 100644 index 000000000..6c048cb15 --- /dev/null +++ b/shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7350824+07:00 diff --git a/shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.vsh_mod b/shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.vsh_mod new file mode 100644 index 000000000..aa9c9c0a5 --- /dev/null +++ b/shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7352500+07:00 diff --git a/shaders/sh_draw_texture/sh_draw_texture.fsh_mod b/shaders/sh_draw_texture/sh_draw_texture.fsh_mod new file mode 100644 index 000000000..ae2f36896 --- /dev/null +++ b/shaders/sh_draw_texture/sh_draw_texture.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7365828+07:00 diff --git a/shaders/sh_draw_texture/sh_draw_texture.vsh_mod b/shaders/sh_draw_texture/sh_draw_texture.vsh_mod new file mode 100644 index 000000000..50d8de48f --- /dev/null +++ b/shaders/sh_draw_texture/sh_draw_texture.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7367996+07:00 diff --git a/shaders/sh_draw_tile/sh_draw_tile.fsh b/shaders/sh_draw_tile/sh_draw_tile.fsh index c68c249d7..5cc15fcf9 100644 --- a/shaders/sh_draw_tile/sh_draw_tile.fsh +++ b/shaders/sh_draw_tile/sh_draw_tile.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -8,79 +99,6 @@ uniform vec2 position; uniform vec2 scale; uniform float rotation; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - void main() { vec2 pos = position / backDimension; float rot = radians(rotation); diff --git a/shaders/sh_draw_tile/sh_draw_tile.fsh_mod b/shaders/sh_draw_tile/sh_draw_tile.fsh_mod new file mode 100644 index 000000000..a2976b277 --- /dev/null +++ b/shaders/sh_draw_tile/sh_draw_tile.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7378311+07:00 diff --git a/shaders/sh_draw_tile/sh_draw_tile.vsh_mod b/shaders/sh_draw_tile/sh_draw_tile.vsh_mod new file mode 100644 index 000000000..eec521572 --- /dev/null +++ b/shaders/sh_draw_tile/sh_draw_tile.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7380017+07:00 diff --git a/shaders/sh_draw_tile_apply/sh_draw_tile_apply.fsh_mod b/shaders/sh_draw_tile_apply/sh_draw_tile_apply.fsh_mod new file mode 100644 index 000000000..76c740fca --- /dev/null +++ b/shaders/sh_draw_tile_apply/sh_draw_tile_apply.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-18T12:52:44.7694390+07:00 diff --git a/shaders/sh_draw_tile_apply/sh_draw_tile_apply.vsh_mod b/shaders/sh_draw_tile_apply/sh_draw_tile_apply.vsh_mod new file mode 100644 index 000000000..b8c4d7a22 --- /dev/null +++ b/shaders/sh_draw_tile_apply/sh_draw_tile_apply.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T10:36:04.4921996+07:00 diff --git a/shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.fsh_mod b/shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.fsh_mod new file mode 100644 index 000000000..d5e5fa07c --- /dev/null +++ b/shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-18T12:53:31.7003051+07:00 diff --git a/shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.vsh_mod b/shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.vsh_mod new file mode 100644 index 000000000..60d92df65 --- /dev/null +++ b/shaders/sh_draw_tile_apply_selection/sh_draw_tile_apply_selection.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-18T12:51:22.8457962+07:00 diff --git a/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh b/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh index d888bcd57..361a5ab89 100644 --- a/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh +++ b/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh @@ -1,12 +1,8 @@ -// varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform float index; - -// uniform int autotile_type; -// uniform int autotile_bitmask_in[256]; -// uniform int autotile_bitmask_out[256]; +uniform float varient; void main() { - gl_FragColor = vec4(index + 1., 0., 0., 1.); + gl_FragColor = vec4(index + 1., varient, 0., 1.); } diff --git a/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh_mod b/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh_mod new file mode 100644 index 000000000..d75d107ca --- /dev/null +++ b/shaders/sh_draw_tile_brush/sh_draw_tile_brush.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-19T12:30:10.3555291+07:00 diff --git a/shaders/sh_draw_tile_brush/sh_draw_tile_brush.vsh_mod b/shaders/sh_draw_tile_brush/sh_draw_tile_brush.vsh_mod new file mode 100644 index 000000000..a449624b5 --- /dev/null +++ b/shaders/sh_draw_tile_brush/sh_draw_tile_brush.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T13:06:22.2215192+07:00 diff --git a/shaders/sh_draw_tile_clear/sh_draw_tile_clear.fsh_mod b/shaders/sh_draw_tile_clear/sh_draw_tile_clear.fsh_mod new file mode 100644 index 000000000..58d5b7e7b --- /dev/null +++ b/shaders/sh_draw_tile_clear/sh_draw_tile_clear.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T15:38:12.2088214+07:00 diff --git a/shaders/sh_draw_tile_clear/sh_draw_tile_clear.vsh_mod b/shaders/sh_draw_tile_clear/sh_draw_tile_clear.vsh_mod new file mode 100644 index 000000000..230598ed9 --- /dev/null +++ b/shaders/sh_draw_tile_clear/sh_draw_tile_clear.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T15:35:50.6486830+07:00 diff --git a/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh b/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh index 2b08ce475..2d2525f66 100644 --- a/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh +++ b/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh @@ -11,13 +11,28 @@ uniform vec2 tileTextureDim; uniform sampler2D indexTexture; uniform vec2 indexTextureDim; +int mod(int a, int b) { return a - (a / b) * b; } + void main() { vec2 px = v_vTexcoord * dimension; - vec2 tileTx = mod(px, tileSize); - float index = texture2D( indexTexture, floor(px / tileSize) / indexTextureDim ).r - 1.; - vec2 texTx = vec2(mod(index, tileAmo.x), floor(index / tileAmo.x)) * tileSize; + vec4 samIdx = texture2D( indexTexture, floor(px / tileSize) / indexTextureDim ); + float index = samIdx.r - 1.; + vec2 texTx = vec2(mod(index, tileAmo.x), floor(index / tileAmo.x)) * tileSize; + vec2 tileTx = mod(px, tileSize) / tileSize; - gl_FragColor = texture2D( tileTexture, (texTx + tileTx) / tileTextureDim ); - // gl_FragColor = vec4(tileTx, 0., 1.); + float vari = samIdx.g + 0.1; + + float mRotation = mod(floor(vari), 4.); + float mFlipH = mod(floor(vari / 8.), 2.); + float mFlipV = mod(floor(vari / 16.), 2.); + + if(mFlipH == 1.) tileTx.x = 1. - tileTx.x; + if(mFlipV == 1.) tileTx.y = 1. - tileTx.y; + if(mRotation == 1.) tileTx = vec2(tileTx.y, 1. - tileTx.x); + if(mRotation == 2.) tileTx = 1. - tileTx; + if(mRotation == 3.) tileTx = vec2(1. - tileTx.y, tileTx.x); + + vec2 samTx = texTx + tileTx * tileSize; + gl_FragColor = texture2D( tileTexture, samTx / tileTextureDim ); } diff --git a/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh_mod b/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh_mod new file mode 100644 index 000000000..aa69bf20d --- /dev/null +++ b/shaders/sh_draw_tile_map/sh_draw_tile_map.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-16T08:42:39.7156240+07:00 diff --git a/shaders/sh_draw_tile_map/sh_draw_tile_map.vsh_mod b/shaders/sh_draw_tile_map/sh_draw_tile_map.vsh_mod new file mode 100644 index 000000000..947171211 --- /dev/null +++ b/shaders/sh_draw_tile_map/sh_draw_tile_map.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7374072+07:00 diff --git a/shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.fsh_mod b/shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.fsh_mod new file mode 100644 index 000000000..410431b96 --- /dev/null +++ b/shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7384276+07:00 diff --git a/shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.vsh_mod b/shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.vsh_mod new file mode 100644 index 000000000..8c6eef7df --- /dev/null +++ b/shaders/sh_draw_vertex_aa/sh_draw_vertex_aa.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7386091+07:00 diff --git a/shaders/sh_edge_detect/sh_edge_detect.fsh b/shaders/sh_edge_detect/sh_edge_detect.fsh index 62fc5c40a..877c7a6d6 100644 --- a/shaders/sh_edge_detect/sh_edge_detect.fsh +++ b/shaders/sh_edge_detect/sh_edge_detect.fsh @@ -1,31 +1,26 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 dimension; uniform int filter; -uniform int sampleMode; - -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} const mat3 sobel = mat3( -1., -2., -1., 0., 0., 0., @@ -79,7 +74,7 @@ float bright(in vec4 col) { void main() { vec2 texel = vec2(1.) / dimension; - vec4 point = sampleTexture( v_vTexcoord ); + vec4 point = sampleTexture( gm_BaseTexture, v_vTexcoord ); vec4 hColor = vec4(0.); vec4 vColor = vec4(0.); @@ -100,7 +95,7 @@ void main() { int ii = int(1. + i); int jj = int(1. + j); - vec4 sam = sampleTexture( pxs ); + vec4 sam = sampleTexture( gm_BaseTexture, pxs ); hColor0 += sam * laplac_r0[jj][ii]; //hColor1 += sam * laplac_r1[jj][ii]; @@ -133,13 +128,15 @@ void main() { int jj = int(1. + j); if(filter == 0) { - hColor += sampleTexture( pxs ) * sobel[jj][ii]; - vColor += sampleTexture( pxs ) * sobel[ii][jj]; + hColor += sampleTexture( gm_BaseTexture, pxs ) * sobel[jj][ii]; + vColor += sampleTexture( gm_BaseTexture, pxs ) * sobel[ii][jj]; + } else if(filter == 1) { - hColor += sampleTexture( pxs ) * prewit[jj][ii]; - vColor += sampleTexture( pxs ) * prewit[ii][jj]; + hColor += sampleTexture( gm_BaseTexture, pxs ) * prewit[jj][ii]; + vColor += sampleTexture( gm_BaseTexture, pxs ) * prewit[ii][jj]; + } else if(filter == 2) { - hColor += sampleTexture( pxs ) * laplac[jj][ii]; + hColor += sampleTexture( gm_BaseTexture, pxs ) * laplac[jj][ii]; } } } diff --git a/shaders/sh_edge_detect/sh_edge_detect.fsh_mod b/shaders/sh_edge_detect/sh_edge_detect.fsh_mod new file mode 100644 index 000000000..77964d2d9 --- /dev/null +++ b/shaders/sh_edge_detect/sh_edge_detect.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7390170+07:00 diff --git a/shaders/sh_edge_detect/sh_edge_detect.vsh_mod b/shaders/sh_edge_detect/sh_edge_detect.vsh_mod new file mode 100644 index 000000000..cf3448a3b --- /dev/null +++ b/shaders/sh_edge_detect/sh_edge_detect.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7391907+07:00 diff --git a/shaders/sh_edge_shade_apply/sh_edge_shade_apply.fsh_mod b/shaders/sh_edge_shade_apply/sh_edge_shade_apply.fsh_mod new file mode 100644 index 000000000..59c5d1342 --- /dev/null +++ b/shaders/sh_edge_shade_apply/sh_edge_shade_apply.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7395907+07:00 diff --git a/shaders/sh_edge_shade_apply/sh_edge_shade_apply.vsh_mod b/shaders/sh_edge_shade_apply/sh_edge_shade_apply.vsh_mod new file mode 100644 index 000000000..759a1e0b1 --- /dev/null +++ b/shaders/sh_edge_shade_apply/sh_edge_shade_apply.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7397722+07:00 diff --git a/shaders/sh_edge_shade_convert/sh_edge_shade_convert.fsh_mod b/shaders/sh_edge_shade_convert/sh_edge_shade_convert.fsh_mod new file mode 100644 index 000000000..3805c1f96 --- /dev/null +++ b/shaders/sh_edge_shade_convert/sh_edge_shade_convert.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7402057+07:00 diff --git a/shaders/sh_edge_shade_convert/sh_edge_shade_convert.vsh_mod b/shaders/sh_edge_shade_convert/sh_edge_shade_convert.vsh_mod new file mode 100644 index 000000000..c9f4289b4 --- /dev/null +++ b/shaders/sh_edge_shade_convert/sh_edge_shade_convert.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7403724+07:00 diff --git a/shaders/sh_edge_shade_extract/sh_edge_shade_extract.fsh_mod b/shaders/sh_edge_shade_extract/sh_edge_shade_extract.fsh_mod new file mode 100644 index 000000000..fe1390bf7 --- /dev/null +++ b/shaders/sh_edge_shade_extract/sh_edge_shade_extract.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7408204+07:00 diff --git a/shaders/sh_edge_shade_extract/sh_edge_shade_extract.vsh_mod b/shaders/sh_edge_shade_extract/sh_edge_shade_extract.vsh_mod new file mode 100644 index 000000000..10d37ca76 --- /dev/null +++ b/shaders/sh_edge_shade_extract/sh_edge_shade_extract.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7410090+07:00 diff --git a/shaders/sh_erode/sh_erode.fsh_mod b/shaders/sh_erode/sh_erode.fsh_mod new file mode 100644 index 000000000..640bcb827 --- /dev/null +++ b/shaders/sh_erode/sh_erode.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7414950+07:00 diff --git a/shaders/sh_erode/sh_erode.vsh_mod b/shaders/sh_erode/sh_erode.vsh_mod new file mode 100644 index 000000000..854cfa682 --- /dev/null +++ b/shaders/sh_erode/sh_erode.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7417209+07:00 diff --git a/shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.fsh_mod b/shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.fsh_mod new file mode 100644 index 000000000..796ed9512 --- /dev/null +++ b/shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7421736+07:00 diff --git a/shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.vsh_mod b/shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.vsh_mod new file mode 100644 index 000000000..f087ebb8a --- /dev/null +++ b/shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7423795+07:00 diff --git a/shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.fsh_mod b/shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.fsh_mod new file mode 100644 index 000000000..868e9d4a1 --- /dev/null +++ b/shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7429491+07:00 diff --git a/shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.vsh_mod b/shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.vsh_mod new file mode 100644 index 000000000..22618cbe7 --- /dev/null +++ b/shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7431852+07:00 diff --git a/shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.fsh_mod b/shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.fsh_mod new file mode 100644 index 000000000..a975b197b --- /dev/null +++ b/shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7436257+07:00 diff --git a/shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.vsh_mod b/shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.vsh_mod new file mode 100644 index 000000000..7be4746c5 --- /dev/null +++ b/shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7438046+07:00 diff --git a/shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.fsh_mod b/shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.fsh_mod new file mode 100644 index 000000000..6e01983c0 --- /dev/null +++ b/shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7442183+07:00 diff --git a/shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.vsh_mod b/shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.vsh_mod new file mode 100644 index 000000000..e3607e4c0 --- /dev/null +++ b/shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7444478+07:00 diff --git a/shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.fsh_mod b/shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.fsh_mod new file mode 100644 index 000000000..50cffcec3 --- /dev/null +++ b/shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7449474+07:00 diff --git a/shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.vsh_mod b/shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.vsh_mod new file mode 100644 index 000000000..1f38c2e6b --- /dev/null +++ b/shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7451441+07:00 diff --git a/shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.fsh_mod b/shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.fsh_mod new file mode 100644 index 000000000..a033f697c --- /dev/null +++ b/shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7455976+07:00 diff --git a/shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.vsh_mod b/shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.vsh_mod new file mode 100644 index 000000000..5e0ff6a2f --- /dev/null +++ b/shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7457769+07:00 diff --git a/shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.fsh_mod b/shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.fsh_mod new file mode 100644 index 000000000..af1593453 --- /dev/null +++ b/shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7461949+07:00 diff --git a/shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.vsh_mod b/shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.vsh_mod new file mode 100644 index 000000000..71a2ac99d --- /dev/null +++ b/shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7463818+07:00 diff --git a/shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.fsh_mod b/shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.fsh_mod new file mode 100644 index 000000000..2e1095322 --- /dev/null +++ b/shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7468164+07:00 diff --git a/shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.vsh_mod b/shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.vsh_mod new file mode 100644 index 000000000..8d4ff3bc8 --- /dev/null +++ b/shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7469887+07:00 diff --git a/shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.fsh_mod b/shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.fsh_mod new file mode 100644 index 000000000..a3f8908ad --- /dev/null +++ b/shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7474156+07:00 diff --git a/shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.vsh_mod b/shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.vsh_mod new file mode 100644 index 000000000..c469dfeff --- /dev/null +++ b/shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7476062+07:00 diff --git a/shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.fsh_mod b/shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.fsh_mod new file mode 100644 index 000000000..87da042c7 --- /dev/null +++ b/shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7480544+07:00 diff --git a/shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.vsh_mod b/shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.vsh_mod new file mode 100644 index 000000000..9f40fca46 --- /dev/null +++ b/shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7482257+07:00 diff --git a/shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.fsh_mod b/shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.fsh_mod new file mode 100644 index 000000000..5ee9403bc --- /dev/null +++ b/shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7486413+07:00 diff --git a/shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.vsh_mod b/shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.vsh_mod new file mode 100644 index 000000000..da9045e4e --- /dev/null +++ b/shaders/sh_fd_replace_material_advanced_glsl/sh_fd_replace_material_advanced_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7488272+07:00 diff --git a/shaders/sh_fd_repulse/sh_fd_repulse.fsh_mod b/shaders/sh_fd_repulse/sh_fd_repulse.fsh_mod new file mode 100644 index 000000000..c4a81c588 --- /dev/null +++ b/shaders/sh_fd_repulse/sh_fd_repulse.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7493295+07:00 diff --git a/shaders/sh_fd_repulse/sh_fd_repulse.vsh_mod b/shaders/sh_fd_repulse/sh_fd_repulse.vsh_mod new file mode 100644 index 000000000..74c37ffa3 --- /dev/null +++ b/shaders/sh_fd_repulse/sh_fd_repulse.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7495119+07:00 diff --git a/shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.fsh_mod b/shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.fsh_mod new file mode 100644 index 000000000..d15994ece --- /dev/null +++ b/shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7499455+07:00 diff --git a/shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.vsh_mod b/shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.vsh_mod new file mode 100644 index 000000000..aee682c66 --- /dev/null +++ b/shaders/sh_fd_subtract_pressure_gradient_glsl/sh_fd_subtract_pressure_gradient_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7501480+07:00 diff --git a/shaders/sh_fd_turbulence/sh_fd_turbulence.fsh_mod b/shaders/sh_fd_turbulence/sh_fd_turbulence.fsh_mod new file mode 100644 index 000000000..aff563eb6 --- /dev/null +++ b/shaders/sh_fd_turbulence/sh_fd_turbulence.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7505956+07:00 diff --git a/shaders/sh_fd_turbulence/sh_fd_turbulence.vsh_mod b/shaders/sh_fd_turbulence/sh_fd_turbulence.vsh_mod new file mode 100644 index 000000000..94ff5f733 --- /dev/null +++ b/shaders/sh_fd_turbulence/sh_fd_turbulence.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7507954+07:00 diff --git a/shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.fsh_mod b/shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.fsh_mod new file mode 100644 index 000000000..ff51fb994 --- /dev/null +++ b/shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7512205+07:00 diff --git a/shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.vsh_mod b/shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.vsh_mod new file mode 100644 index 000000000..97c30fcda --- /dev/null +++ b/shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7514008+07:00 diff --git a/shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.fsh_mod b/shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.fsh_mod new file mode 100644 index 000000000..c4938d2b3 --- /dev/null +++ b/shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7518256+07:00 diff --git a/shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.vsh_mod b/shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.vsh_mod new file mode 100644 index 000000000..30c407bb6 --- /dev/null +++ b/shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7519959+07:00 diff --git a/shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.fsh_mod b/shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.fsh_mod new file mode 100644 index 000000000..4efaf4d51 --- /dev/null +++ b/shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7524142+07:00 diff --git a/shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.vsh_mod b/shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.vsh_mod new file mode 100644 index 000000000..c05109cb2 --- /dev/null +++ b/shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7525998+07:00 diff --git a/shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.fsh_mod b/shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.fsh_mod new file mode 100644 index 000000000..00db828f7 --- /dev/null +++ b/shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7532104+07:00 diff --git a/shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.vsh_mod b/shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.vsh_mod new file mode 100644 index 000000000..eaff16ea7 --- /dev/null +++ b/shaders/sh_fd_visualize_pixel_art_fire_glsl/sh_fd_visualize_pixel_art_fire_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7534658+07:00 diff --git a/shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.fsh_mod b/shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.fsh_mod new file mode 100644 index 000000000..248f2340f --- /dev/null +++ b/shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7539016+07:00 diff --git a/shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.vsh_mod b/shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.vsh_mod new file mode 100644 index 000000000..6a4f72d78 --- /dev/null +++ b/shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7540935+07:00 diff --git a/shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.fsh_mod b/shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.fsh_mod new file mode 100644 index 000000000..de422cc07 --- /dev/null +++ b/shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7545670+07:00 diff --git a/shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.vsh_mod b/shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.vsh_mod new file mode 100644 index 000000000..633208f60 --- /dev/null +++ b/shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7547532+07:00 diff --git a/shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.fsh_mod b/shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.fsh_mod new file mode 100644 index 000000000..e66347056 --- /dev/null +++ b/shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7552295+07:00 diff --git a/shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.vsh_mod b/shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.vsh_mod new file mode 100644 index 000000000..d8674efe7 --- /dev/null +++ b/shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7554058+07:00 diff --git a/shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.fsh_mod b/shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.fsh_mod new file mode 100644 index 000000000..859726d66 --- /dev/null +++ b/shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7558501+07:00 diff --git a/shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.vsh_mod b/shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.vsh_mod new file mode 100644 index 000000000..bbf45024d --- /dev/null +++ b/shaders/sh_fd_visualize_velocity_glsl/sh_fd_visualize_velocity_glsl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7560363+07:00 diff --git a/shaders/sh_fd_vortex/sh_fd_vortex.fsh_mod b/shaders/sh_fd_vortex/sh_fd_vortex.fsh_mod new file mode 100644 index 000000000..1c7adaba9 --- /dev/null +++ b/shaders/sh_fd_vortex/sh_fd_vortex.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7564722+07:00 diff --git a/shaders/sh_fd_vortex/sh_fd_vortex.vsh_mod b/shaders/sh_fd_vortex/sh_fd_vortex.vsh_mod new file mode 100644 index 000000000..e42548dce --- /dev/null +++ b/shaders/sh_fd_vortex/sh_fd_vortex.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7566875+07:00 diff --git a/shaders/sh_find_boundary/sh_find_boundary.fsh_mod b/shaders/sh_find_boundary/sh_find_boundary.fsh_mod new file mode 100644 index 000000000..3e5323954 --- /dev/null +++ b/shaders/sh_find_boundary/sh_find_boundary.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7585341+07:00 diff --git a/shaders/sh_find_boundary/sh_find_boundary.vsh_mod b/shaders/sh_find_boundary/sh_find_boundary.vsh_mod new file mode 100644 index 000000000..900aa66ed --- /dev/null +++ b/shaders/sh_find_boundary/sh_find_boundary.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7587018+07:00 diff --git a/shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.fsh_mod b/shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.fsh_mod new file mode 100644 index 000000000..b5cb3c0ed --- /dev/null +++ b/shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7572312+07:00 diff --git a/shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.vsh_mod b/shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.vsh_mod new file mode 100644 index 000000000..9604e67a0 --- /dev/null +++ b/shaders/sh_find_boundary_stretch_x/sh_find_boundary_stretch_x.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7574090+07:00 diff --git a/shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.fsh_mod b/shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.fsh_mod new file mode 100644 index 000000000..0c5605736 --- /dev/null +++ b/shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7578563+07:00 diff --git a/shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.vsh_mod b/shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.vsh_mod new file mode 100644 index 000000000..660898824 --- /dev/null +++ b/shaders/sh_find_boundary_stretch_y/sh_find_boundary_stretch_y.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7580947+07:00 diff --git a/shaders/sh_find_pixel/sh_find_pixel.fsh_mod b/shaders/sh_find_pixel/sh_find_pixel.fsh_mod new file mode 100644 index 000000000..c48fbae07 --- /dev/null +++ b/shaders/sh_find_pixel/sh_find_pixel.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7591247+07:00 diff --git a/shaders/sh_find_pixel/sh_find_pixel.vsh_mod b/shaders/sh_find_pixel/sh_find_pixel.vsh_mod new file mode 100644 index 000000000..3020b2ecd --- /dev/null +++ b/shaders/sh_find_pixel/sh_find_pixel.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7593042+07:00 diff --git a/shaders/sh_flip/sh_flip.fsh_mod b/shaders/sh_flip/sh_flip.fsh_mod new file mode 100644 index 000000000..b18f3592a --- /dev/null +++ b/shaders/sh_flip/sh_flip.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7609667+07:00 diff --git a/shaders/sh_flip/sh_flip.vsh_mod b/shaders/sh_flip/sh_flip.vsh_mod new file mode 100644 index 000000000..6b3f79ce8 --- /dev/null +++ b/shaders/sh_flip/sh_flip.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7612081+07:00 diff --git a/shaders/sh_flood_fill_it/sh_flood_fill_it.fsh_mod b/shaders/sh_flood_fill_it/sh_flood_fill_it.fsh_mod new file mode 100644 index 000000000..969cd122a --- /dev/null +++ b/shaders/sh_flood_fill_it/sh_flood_fill_it.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7617154+07:00 diff --git a/shaders/sh_flood_fill_it/sh_flood_fill_it.vsh_mod b/shaders/sh_flood_fill_it/sh_flood_fill_it.vsh_mod new file mode 100644 index 000000000..093139f55 --- /dev/null +++ b/shaders/sh_flood_fill_it/sh_flood_fill_it.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7618818+07:00 diff --git a/shaders/sh_flood_fill_replace/sh_flood_fill_replace.fsh_mod b/shaders/sh_flood_fill_replace/sh_flood_fill_replace.fsh_mod new file mode 100644 index 000000000..70ea873ea --- /dev/null +++ b/shaders/sh_flood_fill_replace/sh_flood_fill_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7622891+07:00 diff --git a/shaders/sh_flood_fill_replace/sh_flood_fill_replace.vsh_mod b/shaders/sh_flood_fill_replace/sh_flood_fill_replace.vsh_mod new file mode 100644 index 000000000..757bc411c --- /dev/null +++ b/shaders/sh_flood_fill_replace/sh_flood_fill_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7624488+07:00 diff --git a/shaders/sh_flood_fill_thres/sh_flood_fill_thres.fsh_mod b/shaders/sh_flood_fill_thres/sh_flood_fill_thres.fsh_mod new file mode 100644 index 000000000..740999412 --- /dev/null +++ b/shaders/sh_flood_fill_thres/sh_flood_fill_thres.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7628311+07:00 diff --git a/shaders/sh_flood_fill_thres/sh_flood_fill_thres.vsh_mod b/shaders/sh_flood_fill_thres/sh_flood_fill_thres.vsh_mod new file mode 100644 index 000000000..41477940c --- /dev/null +++ b/shaders/sh_flood_fill_thres/sh_flood_fill_thres.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7629908+07:00 diff --git a/shaders/sh_fluid_bleach/sh_fluid_bleach.fsh_mod b/shaders/sh_fluid_bleach/sh_fluid_bleach.fsh_mod new file mode 100644 index 000000000..1cffdbbcf --- /dev/null +++ b/shaders/sh_fluid_bleach/sh_fluid_bleach.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7633776+07:00 diff --git a/shaders/sh_fluid_bleach/sh_fluid_bleach.vsh_mod b/shaders/sh_fluid_bleach/sh_fluid_bleach.vsh_mod new file mode 100644 index 000000000..8cf29086d --- /dev/null +++ b/shaders/sh_fluid_bleach/sh_fluid_bleach.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7635569+07:00 diff --git a/shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.fsh_mod b/shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.fsh_mod new file mode 100644 index 000000000..ec21f66ac --- /dev/null +++ b/shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7639401+07:00 diff --git a/shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.vsh_mod b/shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.vsh_mod new file mode 100644 index 000000000..51a44a8d8 --- /dev/null +++ b/shaders/sh_freeform_fill_cleanup/sh_freeform_fill_cleanup.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7641017+07:00 diff --git a/shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.fsh_mod b/shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.fsh_mod new file mode 100644 index 000000000..4c3ec45ff --- /dev/null +++ b/shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7644926+07:00 diff --git a/shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.vsh_mod b/shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.vsh_mod new file mode 100644 index 000000000..3e81706cb --- /dev/null +++ b/shaders/sh_freeform_fill_pass1/sh_freeform_fill_pass1.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7646753+07:00 diff --git a/shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.fsh_mod b/shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.fsh_mod new file mode 100644 index 000000000..d9803213c --- /dev/null +++ b/shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7650888+07:00 diff --git a/shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.vsh_mod b/shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.vsh_mod new file mode 100644 index 000000000..fbd8700fb --- /dev/null +++ b/shaders/sh_freeform_fill_pass2/sh_freeform_fill_pass2.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7652645+07:00 diff --git a/shaders/sh_gamma_map/sh_gamma_map.fsh_mod b/shaders/sh_gamma_map/sh_gamma_map.fsh_mod new file mode 100644 index 000000000..a96049d53 --- /dev/null +++ b/shaders/sh_gamma_map/sh_gamma_map.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7662609+07:00 diff --git a/shaders/sh_gamma_map/sh_gamma_map.vsh_mod b/shaders/sh_gamma_map/sh_gamma_map.vsh_mod new file mode 100644 index 000000000..be95e076f --- /dev/null +++ b/shaders/sh_gamma_map/sh_gamma_map.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7664378+07:00 diff --git a/shaders/sh_get_max_downsampled/sh_get_max_downsampled.fsh_mod b/shaders/sh_get_max_downsampled/sh_get_max_downsampled.fsh_mod new file mode 100644 index 000000000..6af0afb93 --- /dev/null +++ b/shaders/sh_get_max_downsampled/sh_get_max_downsampled.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7668335+07:00 diff --git a/shaders/sh_get_max_downsampled/sh_get_max_downsampled.vsh_mod b/shaders/sh_get_max_downsampled/sh_get_max_downsampled.vsh_mod new file mode 100644 index 000000000..efc18c037 --- /dev/null +++ b/shaders/sh_get_max_downsampled/sh_get_max_downsampled.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7669942+07:00 diff --git a/shaders/sh_get_min_downsampled/sh_get_min_downsampled.fsh_mod b/shaders/sh_get_min_downsampled/sh_get_min_downsampled.fsh_mod new file mode 100644 index 000000000..fb3f1d672 --- /dev/null +++ b/shaders/sh_get_min_downsampled/sh_get_min_downsampled.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7673762+07:00 diff --git a/shaders/sh_get_min_downsampled/sh_get_min_downsampled.vsh_mod b/shaders/sh_get_min_downsampled/sh_get_min_downsampled.vsh_mod new file mode 100644 index 000000000..712e32833 --- /dev/null +++ b/shaders/sh_get_min_downsampled/sh_get_min_downsampled.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7675364+07:00 diff --git a/shaders/sh_glow/sh_glow.fsh_mod b/shaders/sh_glow/sh_glow.fsh_mod new file mode 100644 index 000000000..22b126ade --- /dev/null +++ b/shaders/sh_glow/sh_glow.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7679143+07:00 diff --git a/shaders/sh_glow/sh_glow.vsh_mod b/shaders/sh_glow/sh_glow.vsh_mod new file mode 100644 index 000000000..f98edace5 --- /dev/null +++ b/shaders/sh_glow/sh_glow.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7680797+07:00 diff --git a/shaders/sh_gradient/sh_gradient.fsh_mod b/shaders/sh_gradient/sh_gradient.fsh_mod new file mode 100644 index 000000000..4db21d77e --- /dev/null +++ b/shaders/sh_gradient/sh_gradient.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7705001+07:00 diff --git a/shaders/sh_gradient/sh_gradient.vsh_mod b/shaders/sh_gradient/sh_gradient.vsh_mod new file mode 100644 index 000000000..3d4c2e098 --- /dev/null +++ b/shaders/sh_gradient/sh_gradient.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7707064+07:00 diff --git a/shaders/sh_gradient_display/sh_gradient_display.fsh_mod b/shaders/sh_gradient_display/sh_gradient_display.fsh_mod new file mode 100644 index 000000000..495360da8 --- /dev/null +++ b/shaders/sh_gradient_display/sh_gradient_display.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7690472+07:00 diff --git a/shaders/sh_gradient_display/sh_gradient_display.vsh_mod b/shaders/sh_gradient_display/sh_gradient_display.vsh_mod new file mode 100644 index 000000000..7a11c80a2 --- /dev/null +++ b/shaders/sh_gradient_display/sh_gradient_display.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7692129+07:00 diff --git a/shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.fsh_mod b/shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.fsh_mod new file mode 100644 index 000000000..696c600d1 --- /dev/null +++ b/shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7684923+07:00 diff --git a/shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.vsh_mod b/shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.vsh_mod new file mode 100644 index 000000000..9bc1903e9 --- /dev/null +++ b/shaders/sh_gradient_display_alpha/sh_gradient_display_alpha.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7686523+07:00 diff --git a/shaders/sh_gradient_points/sh_gradient_points.fsh_mod b/shaders/sh_gradient_points/sh_gradient_points.fsh_mod new file mode 100644 index 000000000..7f2f30ef5 --- /dev/null +++ b/shaders/sh_gradient_points/sh_gradient_points.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7698122+07:00 diff --git a/shaders/sh_gradient_points/sh_gradient_points.vsh_mod b/shaders/sh_gradient_points/sh_gradient_points.vsh_mod new file mode 100644 index 000000000..252d05d0a --- /dev/null +++ b/shaders/sh_gradient_points/sh_gradient_points.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7700339+07:00 diff --git a/shaders/sh_grain/sh_grain.fsh_mod b/shaders/sh_grain/sh_grain.fsh_mod new file mode 100644 index 000000000..c7c86ed80 --- /dev/null +++ b/shaders/sh_grain/sh_grain.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7711375+07:00 diff --git a/shaders/sh_grain/sh_grain.vsh_mod b/shaders/sh_grain/sh_grain.vsh_mod new file mode 100644 index 000000000..7dbb6ee06 --- /dev/null +++ b/shaders/sh_grain/sh_grain.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7713351+07:00 diff --git a/shaders/sh_grey_alpha/sh_grey_alpha.fsh_mod b/shaders/sh_grey_alpha/sh_grey_alpha.fsh_mod new file mode 100644 index 000000000..5fb0ff601 --- /dev/null +++ b/shaders/sh_grey_alpha/sh_grey_alpha.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7726304+07:00 diff --git a/shaders/sh_grey_alpha/sh_grey_alpha.vsh_mod b/shaders/sh_grey_alpha/sh_grey_alpha.vsh_mod new file mode 100644 index 000000000..2b33e9cda --- /dev/null +++ b/shaders/sh_grey_alpha/sh_grey_alpha.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7727902+07:00 diff --git a/shaders/sh_greyscale/sh_greyscale.fsh_mod b/shaders/sh_greyscale/sh_greyscale.fsh_mod new file mode 100644 index 000000000..213140178 --- /dev/null +++ b/shaders/sh_greyscale/sh_greyscale.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7736061+07:00 diff --git a/shaders/sh_greyscale/sh_greyscale.vsh_mod b/shaders/sh_greyscale/sh_greyscale.vsh_mod new file mode 100644 index 000000000..1817f4297 --- /dev/null +++ b/shaders/sh_greyscale/sh_greyscale.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7738101+07:00 diff --git a/shaders/sh_grid/sh_grid.fsh_mod b/shaders/sh_grid/sh_grid.fsh_mod new file mode 100644 index 000000000..a63945595 --- /dev/null +++ b/shaders/sh_grid/sh_grid.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7768320+07:00 diff --git a/shaders/sh_grid/sh_grid.vsh_mod b/shaders/sh_grid/sh_grid.vsh_mod new file mode 100644 index 000000000..375a2e2c6 --- /dev/null +++ b/shaders/sh_grid/sh_grid.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7770179+07:00 diff --git a/shaders/sh_grid_hex/sh_grid_hex.fsh_mod b/shaders/sh_grid_hex/sh_grid_hex.fsh_mod new file mode 100644 index 000000000..c61ae38ff --- /dev/null +++ b/shaders/sh_grid_hex/sh_grid_hex.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7742386+07:00 diff --git a/shaders/sh_grid_hex/sh_grid_hex.vsh_mod b/shaders/sh_grid_hex/sh_grid_hex.vsh_mod new file mode 100644 index 000000000..cba847e21 --- /dev/null +++ b/shaders/sh_grid_hex/sh_grid_hex.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7744643+07:00 diff --git a/shaders/sh_grid_noise/sh_grid_noise.fsh_mod b/shaders/sh_grid_noise/sh_grid_noise.fsh_mod new file mode 100644 index 000000000..3f5c3af2c --- /dev/null +++ b/shaders/sh_grid_noise/sh_grid_noise.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7748895+07:00 diff --git a/shaders/sh_grid_noise/sh_grid_noise.vsh_mod b/shaders/sh_grid_noise/sh_grid_noise.vsh_mod new file mode 100644 index 000000000..cd5e0620c --- /dev/null +++ b/shaders/sh_grid_noise/sh_grid_noise.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7750668+07:00 diff --git a/shaders/sh_grid_pentagonal/sh_grid_pentagonal.fsh_mod b/shaders/sh_grid_pentagonal/sh_grid_pentagonal.fsh_mod new file mode 100644 index 000000000..b8a57eedb --- /dev/null +++ b/shaders/sh_grid_pentagonal/sh_grid_pentagonal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7756434+07:00 diff --git a/shaders/sh_grid_pentagonal/sh_grid_pentagonal.vsh_mod b/shaders/sh_grid_pentagonal/sh_grid_pentagonal.vsh_mod new file mode 100644 index 000000000..c22383e0d --- /dev/null +++ b/shaders/sh_grid_pentagonal/sh_grid_pentagonal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7758528+07:00 diff --git a/shaders/sh_grid_tri/sh_grid_tri.fsh_mod b/shaders/sh_grid_tri/sh_grid_tri.fsh_mod new file mode 100644 index 000000000..e88d53b42 --- /dev/null +++ b/shaders/sh_grid_tri/sh_grid_tri.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7762528+07:00 diff --git a/shaders/sh_grid_tri/sh_grid_tri.vsh_mod b/shaders/sh_grid_tri/sh_grid_tri.vsh_mod new file mode 100644 index 000000000..87630d1f0 --- /dev/null +++ b/shaders/sh_grid_tri/sh_grid_tri.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7764304+07:00 diff --git a/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh_mod b/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh_mod new file mode 100644 index 000000000..4b03dbcc5 --- /dev/null +++ b/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7774234+07:00 diff --git a/shaders/sh_herringbone_tile/sh_herringbone_tile.vsh_mod b/shaders/sh_herringbone_tile/sh_herringbone_tile.vsh_mod new file mode 100644 index 000000000..176edf964 --- /dev/null +++ b/shaders/sh_herringbone_tile/sh_herringbone_tile.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7776083+07:00 diff --git a/shaders/sh_high_pass/sh_high_pass.fsh b/shaders/sh_high_pass/sh_high_pass.fsh index 5a57c9a3c..4750b3393 100644 --- a/shaders/sh_high_pass/sh_high_pass.fsh +++ b/shaders/sh_high_pass/sh_high_pass.fsh @@ -1,23 +1,28 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 dimension; -uniform int sampleMode; uniform float radius; uniform float intensity; -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) return vec4(0.); - else if(sampleMode == 1) return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - else if(sampleMode == 2) return texture2D(gm_BaseTexture, fract(pos)); - else if(sampleMode == 3) return vec4(vec3(0.), 1.); - - return vec4(0.); -} - void main() { vec2 tx = 1. / dimension; vec4 ss = vec4(0.); @@ -31,11 +36,11 @@ void main() { float w = (radius - (abs(i) + abs(j)) + 1.) / radius / 4.; if(w <= 0.) continue; - ss -= sampleTexture( sx ) * w; + ss -= sampleTexture( gm_BaseTexture, sx ) * w; ww += w; } - vec4 sc = sampleTexture( v_vTexcoord ); + vec4 sc = sampleTexture( gm_BaseTexture, v_vTexcoord ); ss += sc * ww; gl_FragColor = vec4(ss.rgb * intensity, sc.a); diff --git a/shaders/sh_high_pass/sh_high_pass.fsh_mod b/shaders/sh_high_pass/sh_high_pass.fsh_mod new file mode 100644 index 000000000..687f787e1 --- /dev/null +++ b/shaders/sh_high_pass/sh_high_pass.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7781445+07:00 diff --git a/shaders/sh_high_pass/sh_high_pass.vsh_mod b/shaders/sh_high_pass/sh_high_pass.vsh_mod new file mode 100644 index 000000000..cb526b29c --- /dev/null +++ b/shaders/sh_high_pass/sh_high_pass.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7783324+07:00 diff --git a/shaders/sh_image_trace/sh_image_trace.fsh_mod b/shaders/sh_image_trace/sh_image_trace.fsh_mod new file mode 100644 index 000000000..540b9b638 --- /dev/null +++ b/shaders/sh_image_trace/sh_image_trace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7787348+07:00 diff --git a/shaders/sh_image_trace/sh_image_trace.vsh_mod b/shaders/sh_image_trace/sh_image_trace.vsh_mod new file mode 100644 index 000000000..a6cdc45b5 --- /dev/null +++ b/shaders/sh_image_trace/sh_image_trace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7788993+07:00 diff --git a/shaders/sh_interlaced/sh_interlaced.fsh_mod b/shaders/sh_interlaced/sh_interlaced.fsh_mod new file mode 100644 index 000000000..98241469e --- /dev/null +++ b/shaders/sh_interlaced/sh_interlaced.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7793314+07:00 diff --git a/shaders/sh_interlaced/sh_interlaced.vsh_mod b/shaders/sh_interlaced/sh_interlaced.vsh_mod new file mode 100644 index 000000000..134adc340 --- /dev/null +++ b/shaders/sh_interlaced/sh_interlaced.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7795102+07:00 diff --git a/shaders/sh_interpret_number/sh_interpret_number.fsh_mod b/shaders/sh_interpret_number/sh_interpret_number.fsh_mod new file mode 100644 index 000000000..9cfdb1a0f --- /dev/null +++ b/shaders/sh_interpret_number/sh_interpret_number.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7799252+07:00 diff --git a/shaders/sh_interpret_number/sh_interpret_number.vsh_mod b/shaders/sh_interpret_number/sh_interpret_number.vsh_mod new file mode 100644 index 000000000..c1a2cbadb --- /dev/null +++ b/shaders/sh_interpret_number/sh_interpret_number.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7801144+07:00 diff --git a/shaders/sh_invert/sh_invert.fsh_mod b/shaders/sh_invert/sh_invert.fsh_mod new file mode 100644 index 000000000..0fe95bbcc --- /dev/null +++ b/shaders/sh_invert/sh_invert.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7805134+07:00 diff --git a/shaders/sh_invert/sh_invert.vsh_mod b/shaders/sh_invert/sh_invert.vsh_mod new file mode 100644 index 000000000..867eee500 --- /dev/null +++ b/shaders/sh_invert/sh_invert.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7806814+07:00 diff --git a/shaders/sh_jpeg_dct/sh_jpeg_dct.fsh_mod b/shaders/sh_jpeg_dct/sh_jpeg_dct.fsh_mod new file mode 100644 index 000000000..e5e42525e --- /dev/null +++ b/shaders/sh_jpeg_dct/sh_jpeg_dct.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7810775+07:00 diff --git a/shaders/sh_jpeg_dct/sh_jpeg_dct.vsh_mod b/shaders/sh_jpeg_dct/sh_jpeg_dct.vsh_mod new file mode 100644 index 000000000..306278bd5 --- /dev/null +++ b/shaders/sh_jpeg_dct/sh_jpeg_dct.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7812588+07:00 diff --git a/shaders/sh_jpeg_recons/sh_jpeg_recons.fsh_mod b/shaders/sh_jpeg_recons/sh_jpeg_recons.fsh_mod new file mode 100644 index 000000000..34771d158 --- /dev/null +++ b/shaders/sh_jpeg_recons/sh_jpeg_recons.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7816698+07:00 diff --git a/shaders/sh_jpeg_recons/sh_jpeg_recons.vsh_mod b/shaders/sh_jpeg_recons/sh_jpeg_recons.vsh_mod new file mode 100644 index 000000000..101894521 --- /dev/null +++ b/shaders/sh_jpeg_recons/sh_jpeg_recons.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7818389+07:00 diff --git a/shaders/sh_kuwahara/sh_kuwahara.fsh_mod b/shaders/sh_kuwahara/sh_kuwahara.fsh_mod new file mode 100644 index 000000000..dc23e975b --- /dev/null +++ b/shaders/sh_kuwahara/sh_kuwahara.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7828197+07:00 diff --git a/shaders/sh_kuwahara/sh_kuwahara.vsh_mod b/shaders/sh_kuwahara/sh_kuwahara.vsh_mod new file mode 100644 index 000000000..09aa9466c --- /dev/null +++ b/shaders/sh_kuwahara/sh_kuwahara.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7829911+07:00 diff --git a/shaders/sh_kuwahara_ani/sh_kuwahara_ani.fsh_mod b/shaders/sh_kuwahara_ani/sh_kuwahara_ani.fsh_mod new file mode 100644 index 000000000..bc9ec2acd --- /dev/null +++ b/shaders/sh_kuwahara_ani/sh_kuwahara_ani.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7822289+07:00 diff --git a/shaders/sh_kuwahara_ani/sh_kuwahara_ani.vsh_mod b/shaders/sh_kuwahara_ani/sh_kuwahara_ani.vsh_mod new file mode 100644 index 000000000..7ab34cac7 --- /dev/null +++ b/shaders/sh_kuwahara_ani/sh_kuwahara_ani.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7823883+07:00 diff --git a/shaders/sh_level/sh_level.fsh_mod b/shaders/sh_level/sh_level.fsh_mod new file mode 100644 index 000000000..a49a6fd9a --- /dev/null +++ b/shaders/sh_level/sh_level.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7842299+07:00 diff --git a/shaders/sh_level/sh_level.vsh_mod b/shaders/sh_level/sh_level.vsh_mod new file mode 100644 index 000000000..734b26cd5 --- /dev/null +++ b/shaders/sh_level/sh_level.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7844081+07:00 diff --git a/shaders/sh_level_selector/sh_level_selector.fsh_mod b/shaders/sh_level_selector/sh_level_selector.fsh_mod new file mode 100644 index 000000000..efb988573 --- /dev/null +++ b/shaders/sh_level_selector/sh_level_selector.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7835954+07:00 diff --git a/shaders/sh_level_selector/sh_level_selector.vsh_mod b/shaders/sh_level_selector/sh_level_selector.vsh_mod new file mode 100644 index 000000000..92009b662 --- /dev/null +++ b/shaders/sh_level_selector/sh_level_selector.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7837957+07:00 diff --git a/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh b/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh index 7b3dd6295..1c4c4b2b0 100644 --- a/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh +++ b/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + #define TAU 6.28318530718 varying vec2 v_vTexcoord; @@ -10,79 +101,6 @@ uniform float radius; uniform float intensity; uniform float falloff; -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - void main() { vec2 tx = 1. / dimension; vec2 p1 = pos1 * tx; diff --git a/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh_mod b/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh_mod new file mode 100644 index 000000000..673505f48 --- /dev/null +++ b/shaders/sh_liquefy_bloat/sh_liquefy_bloat.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7848461+07:00 diff --git a/shaders/sh_liquefy_bloat/sh_liquefy_bloat.vsh_mod b/shaders/sh_liquefy_bloat/sh_liquefy_bloat.vsh_mod new file mode 100644 index 000000000..4cf0bb2d4 --- /dev/null +++ b/shaders/sh_liquefy_bloat/sh_liquefy_bloat.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7850503+07:00 diff --git a/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh b/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh index d7c0e55e5..b460355a4 100644 --- a/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh +++ b/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + #define TAU 6.28318530718 varying vec2 v_vTexcoord; @@ -10,79 +101,6 @@ uniform float radius; uniform float intensity; uniform float falloff; -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - void main() { vec2 tx = 1. / dimension; vec2 p1 = pos1 * tx; diff --git a/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh_mod b/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh_mod new file mode 100644 index 000000000..9b03459a0 --- /dev/null +++ b/shaders/sh_liquefy_pinch/sh_liquefy_pinch.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7854687+07:00 diff --git a/shaders/sh_liquefy_pinch/sh_liquefy_pinch.vsh_mod b/shaders/sh_liquefy_pinch/sh_liquefy_pinch.vsh_mod new file mode 100644 index 000000000..b32842f66 --- /dev/null +++ b/shaders/sh_liquefy_pinch/sh_liquefy_pinch.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7856561+07:00 diff --git a/shaders/sh_liquefy_push/sh_liquefy_push.fsh b/shaders/sh_liquefy_push/sh_liquefy_push.fsh index b4cd1941d..d25c800d3 100644 --- a/shaders/sh_liquefy_push/sh_liquefy_push.fsh +++ b/shaders/sh_liquefy_push/sh_liquefy_push.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -14,79 +105,6 @@ uniform float intensity; uniform float falloff; uniform float pushIntens; -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - vec2 closestPointOnLine(vec2 P, vec2 A, vec2 B, out float t) { vec2 AP = P - A; vec2 AB = B - A; diff --git a/shaders/sh_liquefy_push/sh_liquefy_push.fsh_mod b/shaders/sh_liquefy_push/sh_liquefy_push.fsh_mod new file mode 100644 index 000000000..3c82ab4e7 --- /dev/null +++ b/shaders/sh_liquefy_push/sh_liquefy_push.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7860990+07:00 diff --git a/shaders/sh_liquefy_push/sh_liquefy_push.vsh_mod b/shaders/sh_liquefy_push/sh_liquefy_push.vsh_mod new file mode 100644 index 000000000..58cc6e74e --- /dev/null +++ b/shaders/sh_liquefy_push/sh_liquefy_push.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7863873+07:00 diff --git a/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh b/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh index 6900861b8..099460631 100644 --- a/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh +++ b/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + #define TAU 6.28318530718 varying vec2 v_vTexcoord; @@ -10,79 +101,6 @@ uniform float radius; uniform float intensity; uniform float falloff; -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - void main() { vec2 tx = 1. / dimension; vec2 p1 = pos1 * tx; diff --git a/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh_mod b/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh_mod new file mode 100644 index 000000000..cee3ae304 --- /dev/null +++ b/shaders/sh_liquefy_twirl/sh_liquefy_twirl.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7869179+07:00 diff --git a/shaders/sh_liquefy_twirl/sh_liquefy_twirl.vsh_mod b/shaders/sh_liquefy_twirl/sh_liquefy_twirl.vsh_mod new file mode 100644 index 000000000..d0b4cca9d --- /dev/null +++ b/shaders/sh_liquefy_twirl/sh_liquefy_twirl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7871212+07:00 diff --git a/shaders/sh_local_analyze/sh_local_analyze.fsh b/shaders/sh_local_analyze/sh_local_analyze.fsh index dd93baaa8..a000ff024 100644 --- a/shaders/sh_local_analyze/sh_local_analyze.fsh +++ b/shaders/sh_local_analyze/sh_local_analyze.fsh @@ -1,6 +1,21 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -9,27 +24,6 @@ uniform int algorithm; uniform int shape; uniform float size; -uniform int sampleMode; - -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - float bright(in vec4 col) { return dot(col.rgb, vec3(0.2126, 0.7152, 0.0722)) * col.a; } void main() { @@ -37,7 +31,7 @@ void main() { vec4 acc = vec4(0.); vec4 maxx = vec4(0.), minn = vec4(1.); float weight = 0., _w; - vec4 col = sampleTexture(v_vTexcoord); + vec4 col = sampleTexture( gm_BaseTexture, v_vTexcoord ); for(float i = -size; i <= size; i++) for(float j = -size; j <= size; j++) { @@ -53,7 +47,7 @@ void main() { else if(shape == 2) _w = size - (abs(i) + abs(j)); - vec4 col = sampleTexture(v_vTexcoord + vec2(i, j) * tex); + vec4 col = sampleTexture( gm_BaseTexture, v_vTexcoord + vec2(i, j) * tex ); if(algorithm == 0) { acc += col; diff --git a/shaders/sh_local_analyze/sh_local_analyze.fsh_mod b/shaders/sh_local_analyze/sh_local_analyze.fsh_mod new file mode 100644 index 000000000..005c1134d --- /dev/null +++ b/shaders/sh_local_analyze/sh_local_analyze.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7876508+07:00 diff --git a/shaders/sh_local_analyze/sh_local_analyze.vsh_mod b/shaders/sh_local_analyze/sh_local_analyze.vsh_mod new file mode 100644 index 000000000..5ca1005ec --- /dev/null +++ b/shaders/sh_local_analyze/sh_local_analyze.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7878212+07:00 diff --git a/shaders/sh_lovify/sh_lovify.fsh_mod b/shaders/sh_lovify/sh_lovify.fsh_mod new file mode 100644 index 000000000..8f525c194 --- /dev/null +++ b/shaders/sh_lovify/sh_lovify.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7882552+07:00 diff --git a/shaders/sh_lovify/sh_lovify.vsh_mod b/shaders/sh_lovify/sh_lovify.vsh_mod new file mode 100644 index 000000000..4126e40ca --- /dev/null +++ b/shaders/sh_lovify/sh_lovify.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7884227+07:00 diff --git a/shaders/sh_lum2alpha/sh_lum2alpha.fsh_mod b/shaders/sh_lum2alpha/sh_lum2alpha.fsh_mod new file mode 100644 index 000000000..3486ae82b --- /dev/null +++ b/shaders/sh_lum2alpha/sh_lum2alpha.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7888700+07:00 diff --git a/shaders/sh_lum2alpha/sh_lum2alpha.vsh_mod b/shaders/sh_lum2alpha/sh_lum2alpha.vsh_mod new file mode 100644 index 000000000..65b8df12e --- /dev/null +++ b/shaders/sh_lum2alpha/sh_lum2alpha.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7890400+07:00 diff --git a/shaders/sh_mask/sh_mask.fsh_mod b/shaders/sh_mask/sh_mask.fsh_mod new file mode 100644 index 000000000..a6559ec5f --- /dev/null +++ b/shaders/sh_mask/sh_mask.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7915255+07:00 diff --git a/shaders/sh_mask/sh_mask.vsh_mod b/shaders/sh_mask/sh_mask.vsh_mod new file mode 100644 index 000000000..aad594101 --- /dev/null +++ b/shaders/sh_mask/sh_mask.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7917015+07:00 diff --git a/shaders/sh_mask_expand/sh_mask_expand.fsh_mod b/shaders/sh_mask_expand/sh_mask_expand.fsh_mod new file mode 100644 index 000000000..516ba03c7 --- /dev/null +++ b/shaders/sh_mask_expand/sh_mask_expand.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7894883+07:00 diff --git a/shaders/sh_mask_expand/sh_mask_expand.vsh_mod b/shaders/sh_mask_expand/sh_mask_expand.vsh_mod new file mode 100644 index 000000000..d33a4954b --- /dev/null +++ b/shaders/sh_mask_expand/sh_mask_expand.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7896738+07:00 diff --git a/shaders/sh_mask_invert/sh_mask_invert.fsh_mod b/shaders/sh_mask_invert/sh_mask_invert.fsh_mod new file mode 100644 index 000000000..d53da8145 --- /dev/null +++ b/shaders/sh_mask_invert/sh_mask_invert.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7902481+07:00 diff --git a/shaders/sh_mask_invert/sh_mask_invert.vsh_mod b/shaders/sh_mask_invert/sh_mask_invert.vsh_mod new file mode 100644 index 000000000..e6bbfbd73 --- /dev/null +++ b/shaders/sh_mask_invert/sh_mask_invert.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7904677+07:00 diff --git a/shaders/sh_mask_modify/sh_mask_modify.fsh_mod b/shaders/sh_mask_modify/sh_mask_modify.fsh_mod new file mode 100644 index 000000000..c6542ed9b --- /dev/null +++ b/shaders/sh_mask_modify/sh_mask_modify.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7909226+07:00 diff --git a/shaders/sh_mask_modify/sh_mask_modify.vsh_mod b/shaders/sh_mask_modify/sh_mask_modify.vsh_mod new file mode 100644 index 000000000..f658d3acd --- /dev/null +++ b/shaders/sh_mask_modify/sh_mask_modify.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7910984+07:00 diff --git a/shaders/sh_mesh_generation/sh_mesh_generation.fsh_mod b/shaders/sh_mesh_generation/sh_mesh_generation.fsh_mod new file mode 100644 index 000000000..ef6bc5e8e --- /dev/null +++ b/shaders/sh_mesh_generation/sh_mesh_generation.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7921517+07:00 diff --git a/shaders/sh_mesh_generation/sh_mesh_generation.vsh_mod b/shaders/sh_mesh_generation/sh_mesh_generation.vsh_mod new file mode 100644 index 000000000..187acd820 --- /dev/null +++ b/shaders/sh_mesh_generation/sh_mesh_generation.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7923282+07:00 diff --git a/shaders/sh_mirror/sh_mirror.fsh_mod b/shaders/sh_mirror/sh_mirror.fsh_mod new file mode 100644 index 000000000..865bdb28c --- /dev/null +++ b/shaders/sh_mirror/sh_mirror.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7933450+07:00 diff --git a/shaders/sh_mirror/sh_mirror.vsh_mod b/shaders/sh_mirror/sh_mirror.vsh_mod new file mode 100644 index 000000000..3cfb28edb --- /dev/null +++ b/shaders/sh_mirror/sh_mirror.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7935345+07:00 diff --git a/shaders/sh_mirror_mask/sh_mirror_mask.fsh_mod b/shaders/sh_mirror_mask/sh_mirror_mask.fsh_mod new file mode 100644 index 000000000..a278c5d61 --- /dev/null +++ b/shaders/sh_mirror_mask/sh_mirror_mask.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7927508+07:00 diff --git a/shaders/sh_mirror_mask/sh_mirror_mask.vsh_mod b/shaders/sh_mirror_mask/sh_mirror_mask.vsh_mod new file mode 100644 index 000000000..c86d207eb --- /dev/null +++ b/shaders/sh_mirror_mask/sh_mirror_mask.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7929269+07:00 diff --git a/shaders/sh_mk_ballGrid/sh_mk_ballGrid.fsh_mod b/shaders/sh_mk_ballGrid/sh_mk_ballGrid.fsh_mod new file mode 100644 index 000000000..f14bad159 --- /dev/null +++ b/shaders/sh_mk_ballGrid/sh_mk_ballGrid.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7939592+07:00 diff --git a/shaders/sh_mk_ballGrid/sh_mk_ballGrid.vsh_mod b/shaders/sh_mk_ballGrid/sh_mk_ballGrid.vsh_mod new file mode 100644 index 000000000..2300eb7b4 --- /dev/null +++ b/shaders/sh_mk_ballGrid/sh_mk_ballGrid.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7941748+07:00 diff --git a/shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh_mod b/shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh_mod new file mode 100644 index 000000000..9f9b1b660 --- /dev/null +++ b/shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7946025+07:00 diff --git a/shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh_mod b/shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh_mod new file mode 100644 index 000000000..4a91f9d86 --- /dev/null +++ b/shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7947799+07:00 diff --git a/shaders/sh_mk_flag_shade/sh_mk_flag_shade.fsh_mod b/shaders/sh_mk_flag_shade/sh_mk_flag_shade.fsh_mod new file mode 100644 index 000000000..17b409bf1 --- /dev/null +++ b/shaders/sh_mk_flag_shade/sh_mk_flag_shade.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7952243+07:00 diff --git a/shaders/sh_mk_flag_shade/sh_mk_flag_shade.vsh_mod b/shaders/sh_mk_flag_shade/sh_mk_flag_shade.vsh_mod new file mode 100644 index 000000000..8ba1711a3 --- /dev/null +++ b/shaders/sh_mk_flag_shade/sh_mk_flag_shade.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7954100+07:00 diff --git a/shaders/sh_mk_flipGrid/sh_mk_flipGrid.fsh_mod b/shaders/sh_mk_flipGrid/sh_mk_flipGrid.fsh_mod new file mode 100644 index 000000000..cc507e3f5 --- /dev/null +++ b/shaders/sh_mk_flipGrid/sh_mk_flipGrid.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7960093+07:00 diff --git a/shaders/sh_mk_flipGrid/sh_mk_flipGrid.vsh_mod b/shaders/sh_mk_flipGrid/sh_mk_flipGrid.vsh_mod new file mode 100644 index 000000000..375d7b21c --- /dev/null +++ b/shaders/sh_mk_flipGrid/sh_mk_flipGrid.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7962406+07:00 diff --git a/shaders/sh_mk_fracture/sh_mk_fracture.fsh_mod b/shaders/sh_mk_fracture/sh_mk_fracture.fsh_mod new file mode 100644 index 000000000..df58987a3 --- /dev/null +++ b/shaders/sh_mk_fracture/sh_mk_fracture.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7967674+07:00 diff --git a/shaders/sh_mk_fracture/sh_mk_fracture.vsh_mod b/shaders/sh_mk_fracture/sh_mk_fracture.vsh_mod new file mode 100644 index 000000000..5a1ac2eca --- /dev/null +++ b/shaders/sh_mk_fracture/sh_mk_fracture.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7969543+07:00 diff --git a/shaders/sh_mk_saber_glow/sh_mk_saber_glow.fsh_mod b/shaders/sh_mk_saber_glow/sh_mk_saber_glow.fsh_mod new file mode 100644 index 000000000..4673db509 --- /dev/null +++ b/shaders/sh_mk_saber_glow/sh_mk_saber_glow.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7974152+07:00 diff --git a/shaders/sh_mk_saber_glow/sh_mk_saber_glow.vsh_mod b/shaders/sh_mk_saber_glow/sh_mk_saber_glow.vsh_mod new file mode 100644 index 000000000..939849b85 --- /dev/null +++ b/shaders/sh_mk_saber_glow/sh_mk_saber_glow.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7976111+07:00 diff --git a/shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.fsh_mod b/shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.fsh_mod new file mode 100644 index 000000000..5b275cb95 --- /dev/null +++ b/shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7980523+07:00 diff --git a/shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.vsh_mod b/shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.vsh_mod new file mode 100644 index 000000000..4cf440c09 --- /dev/null +++ b/shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7982252+07:00 diff --git a/shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.fsh_mod b/shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.fsh_mod new file mode 100644 index 000000000..be6c09cc1 --- /dev/null +++ b/shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7986771+07:00 diff --git a/shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.vsh_mod b/shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.vsh_mod new file mode 100644 index 000000000..827bc5aa6 --- /dev/null +++ b/shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7988599+07:00 diff --git a/shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.fsh_mod b/shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.fsh_mod new file mode 100644 index 000000000..31f9e0d60 --- /dev/null +++ b/shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7993064+07:00 diff --git a/shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.vsh_mod b/shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.vsh_mod new file mode 100644 index 000000000..9c6c62dfc --- /dev/null +++ b/shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7994801+07:00 diff --git a/shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.fsh_mod b/shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.fsh_mod new file mode 100644 index 000000000..d79a02a88 --- /dev/null +++ b/shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8012474+07:00 diff --git a/shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.vsh_mod b/shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.vsh_mod new file mode 100644 index 000000000..654e44b12 --- /dev/null +++ b/shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8014262+07:00 diff --git a/shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.fsh_mod b/shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.fsh_mod new file mode 100644 index 000000000..246f28119 --- /dev/null +++ b/shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8005945+07:00 diff --git a/shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.vsh_mod b/shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.vsh_mod new file mode 100644 index 000000000..50a1d09fd --- /dev/null +++ b/shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8008083+07:00 diff --git a/shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.fsh_mod b/shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.fsh_mod new file mode 100644 index 000000000..5313c2e09 --- /dev/null +++ b/shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.7999360+07:00 diff --git a/shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.vsh_mod b/shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.vsh_mod new file mode 100644 index 000000000..c90a7dce0 --- /dev/null +++ b/shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8001598+07:00 diff --git a/shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.fsh_mod b/shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.fsh_mod new file mode 100644 index 000000000..9999ced19 --- /dev/null +++ b/shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8024367+07:00 diff --git a/shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.vsh_mod b/shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.vsh_mod new file mode 100644 index 000000000..2704b1f47 --- /dev/null +++ b/shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8026144+07:00 diff --git a/shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.fsh_mod b/shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.fsh_mod new file mode 100644 index 000000000..ab855701d --- /dev/null +++ b/shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8018451+07:00 diff --git a/shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.vsh_mod b/shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.vsh_mod new file mode 100644 index 000000000..188464131 --- /dev/null +++ b/shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8020208+07:00 diff --git a/shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.fsh_mod b/shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.fsh_mod new file mode 100644 index 000000000..825f0f647 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8031407+07:00 diff --git a/shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.vsh_mod b/shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.vsh_mod new file mode 100644 index 000000000..dee811186 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8033491+07:00 diff --git a/shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.fsh_mod b/shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.fsh_mod new file mode 100644 index 000000000..495e28c43 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8037887+07:00 diff --git a/shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.vsh_mod b/shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.vsh_mod new file mode 100644 index 000000000..b82982d60 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8039653+07:00 diff --git a/shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.fsh_mod b/shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.fsh_mod new file mode 100644 index 000000000..dbec52336 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8043919+07:00 diff --git a/shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.vsh_mod b/shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.vsh_mod new file mode 100644 index 000000000..244a9592e --- /dev/null +++ b/shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8045710+07:00 diff --git a/shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.fsh_mod b/shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.fsh_mod new file mode 100644 index 000000000..c7a515217 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8050028+07:00 diff --git a/shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.vsh_mod b/shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.vsh_mod new file mode 100644 index 000000000..ca624ec95 --- /dev/null +++ b/shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8052164+07:00 diff --git a/shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.fsh_mod b/shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.fsh_mod new file mode 100644 index 000000000..24e53fda3 --- /dev/null +++ b/shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8057251+07:00 diff --git a/shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.vsh_mod b/shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.vsh_mod new file mode 100644 index 000000000..78ebb2d92 --- /dev/null +++ b/shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8059055+07:00 diff --git a/shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.fsh_mod b/shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.fsh_mod new file mode 100644 index 000000000..9a3fdf3b1 --- /dev/null +++ b/shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8064034+07:00 diff --git a/shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.vsh_mod b/shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.vsh_mod new file mode 100644 index 000000000..b87f12abc --- /dev/null +++ b/shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8066128+07:00 diff --git a/shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.fsh_mod b/shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.fsh_mod new file mode 100644 index 000000000..1b31b2b38 --- /dev/null +++ b/shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8070976+07:00 diff --git a/shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.vsh_mod b/shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.vsh_mod new file mode 100644 index 000000000..a9490c0e7 --- /dev/null +++ b/shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8073029+07:00 diff --git a/shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.fsh_mod b/shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.fsh_mod new file mode 100644 index 000000000..257f0ab0a --- /dev/null +++ b/shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8077874+07:00 diff --git a/shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.vsh_mod b/shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.vsh_mod new file mode 100644 index 000000000..49deaaeac --- /dev/null +++ b/shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8080172+07:00 diff --git a/shaders/sh_morph_surface/sh_morph_surface.fsh b/shaders/sh_morph_surface/sh_morph_surface.fsh index 6a8cfa6b6..8ee0136e3 100644 --- a/shaders/sh_morph_surface/sh_morph_surface.fsh +++ b/shaders/sh_morph_surface/sh_morph_surface.fsh @@ -1,6 +1,94 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -12,79 +100,6 @@ uniform float threshold; #define TAU 6.283185307179586 -/////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -/////////////// SAMPLING /////////////// - void main() { gl_FragColor = vec4(0.); diff --git a/shaders/sh_morph_surface/sh_morph_surface.fsh_mod b/shaders/sh_morph_surface/sh_morph_surface.fsh_mod new file mode 100644 index 000000000..7fcfbd526 --- /dev/null +++ b/shaders/sh_morph_surface/sh_morph_surface.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8085484+07:00 diff --git a/shaders/sh_morph_surface/sh_morph_surface.vsh_mod b/shaders/sh_morph_surface/sh_morph_surface.vsh_mod new file mode 100644 index 000000000..0c68a4e93 --- /dev/null +++ b/shaders/sh_morph_surface/sh_morph_surface.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8087881+07:00 diff --git a/shaders/sh_node_arc/sh_node_arc.fsh_mod b/shaders/sh_node_arc/sh_node_arc.fsh_mod new file mode 100644 index 000000000..7511bdbad --- /dev/null +++ b/shaders/sh_node_arc/sh_node_arc.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8093928+07:00 diff --git a/shaders/sh_node_arc/sh_node_arc.vsh_mod b/shaders/sh_node_arc/sh_node_arc.vsh_mod new file mode 100644 index 000000000..653defc77 --- /dev/null +++ b/shaders/sh_node_arc/sh_node_arc.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8095928+07:00 diff --git a/shaders/sh_node_circle/sh_node_circle.fsh_mod b/shaders/sh_node_circle/sh_node_circle.fsh_mod new file mode 100644 index 000000000..cfe605c6e --- /dev/null +++ b/shaders/sh_node_circle/sh_node_circle.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8100962+07:00 diff --git a/shaders/sh_node_circle/sh_node_circle.vsh_mod b/shaders/sh_node_circle/sh_node_circle.vsh_mod new file mode 100644 index 000000000..5122c684b --- /dev/null +++ b/shaders/sh_node_circle/sh_node_circle.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8102759+07:00 diff --git a/shaders/sh_node_widget_rotator/sh_node_widget_rotator.fsh_mod b/shaders/sh_node_widget_rotator/sh_node_widget_rotator.fsh_mod new file mode 100644 index 000000000..d5e2c17d2 --- /dev/null +++ b/shaders/sh_node_widget_rotator/sh_node_widget_rotator.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8107069+07:00 diff --git a/shaders/sh_node_widget_rotator/sh_node_widget_rotator.vsh_mod b/shaders/sh_node_widget_rotator/sh_node_widget_rotator.vsh_mod new file mode 100644 index 000000000..8d45f0b3b --- /dev/null +++ b/shaders/sh_node_widget_rotator/sh_node_widget_rotator.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8108751+07:00 diff --git a/shaders/sh_node_widget_scalar/sh_node_widget_scalar.fsh_mod b/shaders/sh_node_widget_scalar/sh_node_widget_scalar.fsh_mod new file mode 100644 index 000000000..b4be2c6a4 --- /dev/null +++ b/shaders/sh_node_widget_scalar/sh_node_widget_scalar.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8126558+07:00 diff --git a/shaders/sh_node_widget_scalar/sh_node_widget_scalar.vsh_mod b/shaders/sh_node_widget_scalar/sh_node_widget_scalar.vsh_mod new file mode 100644 index 000000000..4f98f6bd1 --- /dev/null +++ b/shaders/sh_node_widget_scalar/sh_node_widget_scalar.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8128296+07:00 diff --git a/shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.fsh_mod b/shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.fsh_mod new file mode 100644 index 000000000..ad2c4ea0d --- /dev/null +++ b/shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8113855+07:00 diff --git a/shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.vsh_mod b/shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.vsh_mod new file mode 100644 index 000000000..e60c67b4e --- /dev/null +++ b/shaders/sh_node_widget_scalar_cross/sh_node_widget_scalar_cross.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8115989+07:00 diff --git a/shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.fsh_mod b/shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.fsh_mod new file mode 100644 index 000000000..5daa1e20c --- /dev/null +++ b/shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8120355+07:00 diff --git a/shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.vsh_mod b/shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.vsh_mod new file mode 100644 index 000000000..8c268dd86 --- /dev/null +++ b/shaders/sh_node_widget_scalar_line/sh_node_widget_scalar_line.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8122271+07:00 diff --git a/shaders/sh_noise/sh_noise.fsh_mod b/shaders/sh_noise/sh_noise.fsh_mod new file mode 100644 index 000000000..f75b24612 --- /dev/null +++ b/shaders/sh_noise/sh_noise.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8210296+07:00 diff --git a/shaders/sh_noise/sh_noise.vsh_mod b/shaders/sh_noise/sh_noise.vsh_mod new file mode 100644 index 000000000..bb6109720 --- /dev/null +++ b/shaders/sh_noise/sh_noise.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8212026+07:00 diff --git a/shaders/sh_noise_bubble/sh_noise_bubble.fsh_mod b/shaders/sh_noise_bubble/sh_noise_bubble.fsh_mod new file mode 100644 index 000000000..914a2efdb --- /dev/null +++ b/shaders/sh_noise_bubble/sh_noise_bubble.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8132591+07:00 diff --git a/shaders/sh_noise_bubble/sh_noise_bubble.vsh_mod b/shaders/sh_noise_bubble/sh_noise_bubble.vsh_mod new file mode 100644 index 000000000..523f09038 --- /dev/null +++ b/shaders/sh_noise_bubble/sh_noise_bubble.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8134464+07:00 diff --git a/shaders/sh_noise_cristal/sh_noise_cristal.fsh_mod b/shaders/sh_noise_cristal/sh_noise_cristal.fsh_mod new file mode 100644 index 000000000..f28152fb9 --- /dev/null +++ b/shaders/sh_noise_cristal/sh_noise_cristal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8138673+07:00 diff --git a/shaders/sh_noise_cristal/sh_noise_cristal.vsh_mod b/shaders/sh_noise_cristal/sh_noise_cristal.vsh_mod new file mode 100644 index 000000000..ac8b9a3ba --- /dev/null +++ b/shaders/sh_noise_cristal/sh_noise_cristal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8140392+07:00 diff --git a/shaders/sh_noise_fbm/sh_noise_fbm.fsh_mod b/shaders/sh_noise_fbm/sh_noise_fbm.fsh_mod new file mode 100644 index 000000000..50382c163 --- /dev/null +++ b/shaders/sh_noise_fbm/sh_noise_fbm.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8144501+07:00 diff --git a/shaders/sh_noise_fbm/sh_noise_fbm.vsh_mod b/shaders/sh_noise_fbm/sh_noise_fbm.vsh_mod new file mode 100644 index 000000000..624075486 --- /dev/null +++ b/shaders/sh_noise_fbm/sh_noise_fbm.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8146190+07:00 diff --git a/shaders/sh_noise_flow/sh_noise_flow.fsh_mod b/shaders/sh_noise_flow/sh_noise_flow.fsh_mod new file mode 100644 index 000000000..5bf35ca69 --- /dev/null +++ b/shaders/sh_noise_flow/sh_noise_flow.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8150723+07:00 diff --git a/shaders/sh_noise_flow/sh_noise_flow.vsh_mod b/shaders/sh_noise_flow/sh_noise_flow.vsh_mod new file mode 100644 index 000000000..95c752b22 --- /dev/null +++ b/shaders/sh_noise_flow/sh_noise_flow.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8152573+07:00 diff --git a/shaders/sh_noise_fold/sh_noise_fold.fsh_mod b/shaders/sh_noise_fold/sh_noise_fold.fsh_mod new file mode 100644 index 000000000..3e559f00e --- /dev/null +++ b/shaders/sh_noise_fold/sh_noise_fold.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8156808+07:00 diff --git a/shaders/sh_noise_fold/sh_noise_fold.vsh_mod b/shaders/sh_noise_fold/sh_noise_fold.vsh_mod new file mode 100644 index 000000000..2819202d9 --- /dev/null +++ b/shaders/sh_noise_fold/sh_noise_fold.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8158540+07:00 diff --git a/shaders/sh_noise_gabor/sh_noise_gabor.fsh_mod b/shaders/sh_noise_gabor/sh_noise_gabor.fsh_mod new file mode 100644 index 000000000..9c8ceab90 --- /dev/null +++ b/shaders/sh_noise_gabor/sh_noise_gabor.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8162794+07:00 diff --git a/shaders/sh_noise_gabor/sh_noise_gabor.vsh_mod b/shaders/sh_noise_gabor/sh_noise_gabor.vsh_mod new file mode 100644 index 000000000..2e90572d4 --- /dev/null +++ b/shaders/sh_noise_gabor/sh_noise_gabor.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8164743+07:00 diff --git a/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh b/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh index e243ea25e..dbae815e1 100644 --- a/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh +++ b/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh @@ -1,6 +1,21 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -10,26 +25,6 @@ uniform vec2 scale; uniform float seed; uniform int useSampler; -uniform int sampleMode; - -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); @@ -62,6 +57,6 @@ void main() { gl_FragColor = vec4(vec3(n), 1.0); } else { vec2 samPos = floor(hx) / scale + 0.5 / scale; - gl_FragColor = sampleTexture( samPos ); + gl_FragColor = sampleTexture( gm_BaseTexture, samPos ); } } diff --git a/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh_mod b/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh_mod new file mode 100644 index 000000000..02342a01d --- /dev/null +++ b/shaders/sh_noise_grid_hex/sh_noise_grid_hex.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8169026+07:00 diff --git a/shaders/sh_noise_grid_hex/sh_noise_grid_hex.vsh_mod b/shaders/sh_noise_grid_hex/sh_noise_grid_hex.vsh_mod new file mode 100644 index 000000000..80194f2a2 --- /dev/null +++ b/shaders/sh_noise_grid_hex/sh_noise_grid_hex.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8170748+07:00 diff --git a/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh b/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh index 77ba4d346..d47056513 100644 --- a/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh +++ b/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh @@ -1,6 +1,21 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -10,26 +25,6 @@ uniform vec2 scale; uniform float seed; uniform int useSampler; -uniform int sampleMode; - -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); @@ -57,6 +52,6 @@ void main() { gl_FragColor = vec4(vec3(n), 1.0); } else { vec2 samPos = floor(hx) / scale + 0.5 / scale; - gl_FragColor = sampleTexture( samPos / vec2(sqrt(3.), 1.1)); + gl_FragColor = sampleTexture( gm_BaseTexture, samPos / vec2(sqrt(3.), 1.1)); } } \ No newline at end of file diff --git a/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh_mod b/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh_mod new file mode 100644 index 000000000..7ec3f1281 --- /dev/null +++ b/shaders/sh_noise_grid_tri/sh_noise_grid_tri.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8176916+07:00 diff --git a/shaders/sh_noise_grid_tri/sh_noise_grid_tri.vsh_mod b/shaders/sh_noise_grid_tri/sh_noise_grid_tri.vsh_mod new file mode 100644 index 000000000..227f7f4c7 --- /dev/null +++ b/shaders/sh_noise_grid_tri/sh_noise_grid_tri.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8178644+07:00 diff --git a/shaders/sh_noise_honey/sh_noise_honey.fsh_mod b/shaders/sh_noise_honey/sh_noise_honey.fsh_mod new file mode 100644 index 000000000..49d91948b --- /dev/null +++ b/shaders/sh_noise_honey/sh_noise_honey.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8184321+07:00 diff --git a/shaders/sh_noise_honey/sh_noise_honey.vsh_mod b/shaders/sh_noise_honey/sh_noise_honey.vsh_mod new file mode 100644 index 000000000..bce62e085 --- /dev/null +++ b/shaders/sh_noise_honey/sh_noise_honey.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8186130+07:00 diff --git a/shaders/sh_noise_shard/sh_noise_shard.fsh_mod b/shaders/sh_noise_shard/sh_noise_shard.fsh_mod new file mode 100644 index 000000000..fa7d9599e --- /dev/null +++ b/shaders/sh_noise_shard/sh_noise_shard.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8190428+07:00 diff --git a/shaders/sh_noise_shard/sh_noise_shard.vsh_mod b/shaders/sh_noise_shard/sh_noise_shard.vsh_mod new file mode 100644 index 000000000..d9c7c5394 --- /dev/null +++ b/shaders/sh_noise_shard/sh_noise_shard.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8192125+07:00 diff --git a/shaders/sh_noise_strand/sh_noise_strand.fsh_mod b/shaders/sh_noise_strand/sh_noise_strand.fsh_mod new file mode 100644 index 000000000..4eec8c8ac --- /dev/null +++ b/shaders/sh_noise_strand/sh_noise_strand.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8197445+07:00 diff --git a/shaders/sh_noise_strand/sh_noise_strand.vsh_mod b/shaders/sh_noise_strand/sh_noise_strand.vsh_mod new file mode 100644 index 000000000..3426381ab --- /dev/null +++ b/shaders/sh_noise_strand/sh_noise_strand.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8199812+07:00 diff --git a/shaders/sh_noise_wavelet/sh_noise_wavelet.fsh_mod b/shaders/sh_noise_wavelet/sh_noise_wavelet.fsh_mod new file mode 100644 index 000000000..ca712ae46 --- /dev/null +++ b/shaders/sh_noise_wavelet/sh_noise_wavelet.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8204383+07:00 diff --git a/shaders/sh_noise_wavelet/sh_noise_wavelet.vsh_mod b/shaders/sh_noise_wavelet/sh_noise_wavelet.vsh_mod new file mode 100644 index 000000000..c882bef0a --- /dev/null +++ b/shaders/sh_noise_wavelet/sh_noise_wavelet.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8206133+07:00 diff --git a/shaders/sh_normal/sh_normal.fsh_mod b/shaders/sh_normal/sh_normal.fsh_mod new file mode 100644 index 000000000..25df97a66 --- /dev/null +++ b/shaders/sh_normal/sh_normal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8245084+07:00 diff --git a/shaders/sh_normal/sh_normal.vsh_mod b/shaders/sh_normal/sh_normal.vsh_mod new file mode 100644 index 000000000..ac26c8c08 --- /dev/null +++ b/shaders/sh_normal/sh_normal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8247097+07:00 diff --git a/shaders/sh_normal_light/sh_normal_light.fsh_mod b/shaders/sh_normal_light/sh_normal_light.fsh_mod new file mode 100644 index 000000000..088efd4ae --- /dev/null +++ b/shaders/sh_normal_light/sh_normal_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8239215+07:00 diff --git a/shaders/sh_normal_light/sh_normal_light.vsh_mod b/shaders/sh_normal_light/sh_normal_light.vsh_mod new file mode 100644 index 000000000..ff79e75e3 --- /dev/null +++ b/shaders/sh_normal_light/sh_normal_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8240738+07:00 diff --git a/shaders/sh_normal_light_apply/sh_normal_light_apply.fsh_mod b/shaders/sh_normal_light_apply/sh_normal_light_apply.fsh_mod new file mode 100644 index 000000000..00341c34b --- /dev/null +++ b/shaders/sh_normal_light_apply/sh_normal_light_apply.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8226851+07:00 diff --git a/shaders/sh_normal_light_apply/sh_normal_light_apply.vsh_mod b/shaders/sh_normal_light_apply/sh_normal_light_apply.vsh_mod new file mode 100644 index 000000000..eec31528b --- /dev/null +++ b/shaders/sh_normal_light_apply/sh_normal_light_apply.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8228812+07:00 diff --git a/shaders/sh_normalize/sh_normalize.fsh_mod b/shaders/sh_normalize/sh_normalize.fsh_mod new file mode 100644 index 000000000..5204857d0 --- /dev/null +++ b/shaders/sh_normalize/sh_normalize.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8252154+07:00 diff --git a/shaders/sh_normalize/sh_normalize.vsh_mod b/shaders/sh_normalize/sh_normalize.vsh_mod new file mode 100644 index 000000000..85feccbc1 --- /dev/null +++ b/shaders/sh_normalize/sh_normalize.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8253877+07:00 diff --git a/shaders/sh_offset/sh_offset.fsh_mod b/shaders/sh_offset/sh_offset.fsh_mod new file mode 100644 index 000000000..4493feccd --- /dev/null +++ b/shaders/sh_offset/sh_offset.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8258273+07:00 diff --git a/shaders/sh_offset/sh_offset.vsh_mod b/shaders/sh_offset/sh_offset.vsh_mod new file mode 100644 index 000000000..07ec1dd3b --- /dev/null +++ b/shaders/sh_offset/sh_offset.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8259998+07:00 diff --git a/shaders/sh_outline/sh_outline.fsh b/shaders/sh_outline/sh_outline.fsh index 4e1046beb..98b8d066e 100644 --- a/shaders/sh_outline/sh_outline.fsh +++ b/shaders/sh_outline/sh_outline.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -26,7 +44,6 @@ uniform vec2 blend_alpha; uniform int blend_alphaUseSurf; uniform sampler2D blend_alphaSurf; -uniform int sampleMode; uniform int outline_only; uniform int highRes; @@ -36,25 +53,6 @@ vec2 round(in vec2 v) { return v; } -vec4 sampleTexture(vec2 pos) { - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} - vec4 blendColor(vec4 base, vec4 colr, float alpha) { float blend = base.a + colr.a * alpha * (1. - base.a); @@ -93,7 +91,7 @@ void checkPixel(vec2 px, vec2 p) { vec2 pxs = floor(p) + 0.5; if(side == 0 && crop_border == 1 && (txs.x < 0. || txs.x > 1. || txs.y < 0. || txs.y > 1.)) return; - vec4 sam = sampleTexture( txs ); + vec4 sam = sampleTexture( gm_BaseTexture, txs ); if(side == 0 && sam.a > 0.) return; //inside border, skip if current pixel is filled if(side == 1 && sam.a < 1.) return; //outside border, skip if current pixel is empty @@ -201,7 +199,7 @@ void main() { vec2 pxs = (pixelPosition + vec2( cos(ang), sin(ang)) ) / dimension; if(side == 0 && crop_border == 1 && (pxs.x < 0. || pxs.x > 1. || pxs.y < 0. || pxs.y > 1.)) continue; - vec4 sam = sampleTexture( pxs ); + vec4 sam = sampleTexture( gm_BaseTexture, pxs ); if((side == 0 && sam.a == 0.) || (side == 1 && sam.a > 0.)) { isOutline = true; diff --git a/shaders/sh_outline/sh_outline.fsh_mod b/shaders/sh_outline/sh_outline.fsh_mod new file mode 100644 index 000000000..56ef148ac --- /dev/null +++ b/shaders/sh_outline/sh_outline.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8271982+07:00 diff --git a/shaders/sh_outline/sh_outline.vsh_mod b/shaders/sh_outline/sh_outline.vsh_mod new file mode 100644 index 000000000..c52d60f9e --- /dev/null +++ b/shaders/sh_outline/sh_outline.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8274052+07:00 diff --git a/shaders/sh_outline_only/sh_outline_only.fsh_mod b/shaders/sh_outline_only/sh_outline_only.fsh_mod new file mode 100644 index 000000000..f15b548b3 --- /dev/null +++ b/shaders/sh_outline_only/sh_outline_only.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8265758+07:00 diff --git a/shaders/sh_outline_only/sh_outline_only.vsh_mod b/shaders/sh_outline_only/sh_outline_only.vsh_mod new file mode 100644 index 000000000..6424d0818 --- /dev/null +++ b/shaders/sh_outline_only/sh_outline_only.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8267642+07:00 diff --git a/shaders/sh_override_channel/sh_override_channel.fsh_mod b/shaders/sh_override_channel/sh_override_channel.fsh_mod new file mode 100644 index 000000000..6fe424b2e --- /dev/null +++ b/shaders/sh_override_channel/sh_override_channel.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8278469+07:00 diff --git a/shaders/sh_override_channel/sh_override_channel.vsh_mod b/shaders/sh_override_channel/sh_override_channel.vsh_mod new file mode 100644 index 000000000..22290de00 --- /dev/null +++ b/shaders/sh_override_channel/sh_override_channel.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8280178+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.fsh_mod b/shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.fsh_mod new file mode 100644 index 000000000..bfb16eace --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8284189+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.vsh_mod b/shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.vsh_mod new file mode 100644 index 000000000..bdaeafdf9 --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_apply/sh_palette_mixer_atlas_expand_apply.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8285840+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.fsh_mod b/shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.fsh_mod new file mode 100644 index 000000000..de66077bc --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8290774+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.vsh_mod b/shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.vsh_mod new file mode 100644 index 000000000..8657a56c3 --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_coord/sh_palette_mixer_atlas_expand_coord.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8293372+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.fsh_mod b/shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.fsh_mod new file mode 100644 index 000000000..7df616c6e --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8298012+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.vsh_mod b/shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.vsh_mod new file mode 100644 index 000000000..82ee3775d --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_iterate/sh_palette_mixer_atlas_expand_iterate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8299900+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.fsh_mod b/shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.fsh_mod new file mode 100644 index 000000000..28679183f --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8304429+07:00 diff --git a/shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.vsh_mod b/shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.vsh_mod new file mode 100644 index 000000000..f67abb921 --- /dev/null +++ b/shaders/sh_palette_mixer_atlas_expand_palette/sh_palette_mixer_atlas_expand_palette.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8306422+07:00 diff --git a/shaders/sh_palette_replace/sh_palette_replace.fsh_mod b/shaders/sh_palette_replace/sh_palette_replace.fsh_mod new file mode 100644 index 000000000..6fe399f3e --- /dev/null +++ b/shaders/sh_palette_replace/sh_palette_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8310943+07:00 diff --git a/shaders/sh_palette_replace/sh_palette_replace.vsh_mod b/shaders/sh_palette_replace/sh_palette_replace.vsh_mod new file mode 100644 index 000000000..32224b8a1 --- /dev/null +++ b/shaders/sh_palette_replace/sh_palette_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8312905+07:00 diff --git a/shaders/sh_palette_shift/sh_palette_shift.fsh_mod b/shaders/sh_palette_shift/sh_palette_shift.fsh_mod new file mode 100644 index 000000000..82fd24c4d --- /dev/null +++ b/shaders/sh_palette_shift/sh_palette_shift.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8317273+07:00 diff --git a/shaders/sh_palette_shift/sh_palette_shift.vsh_mod b/shaders/sh_palette_shift/sh_palette_shift.vsh_mod new file mode 100644 index 000000000..cfc46414b --- /dev/null +++ b/shaders/sh_palette_shift/sh_palette_shift.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8319144+07:00 diff --git a/shaders/sh_path_fill_profile/sh_path_fill_profile.fsh_mod b/shaders/sh_path_fill_profile/sh_path_fill_profile.fsh_mod new file mode 100644 index 000000000..021c2ec6c --- /dev/null +++ b/shaders/sh_path_fill_profile/sh_path_fill_profile.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8323383+07:00 diff --git a/shaders/sh_path_fill_profile/sh_path_fill_profile.vsh_mod b/shaders/sh_path_fill_profile/sh_path_fill_profile.vsh_mod new file mode 100644 index 000000000..05594ed7b --- /dev/null +++ b/shaders/sh_path_fill_profile/sh_path_fill_profile.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8325072+07:00 diff --git a/shaders/sh_pb_blob/sh_pb_blob.fsh_mod b/shaders/sh_pb_blob/sh_pb_blob.fsh_mod new file mode 100644 index 000000000..eb0b50ce0 --- /dev/null +++ b/shaders/sh_pb_blob/sh_pb_blob.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8329476+07:00 diff --git a/shaders/sh_pb_blob/sh_pb_blob.vsh_mod b/shaders/sh_pb_blob/sh_pb_blob.vsh_mod new file mode 100644 index 000000000..9a4fd159e --- /dev/null +++ b/shaders/sh_pb_blob/sh_pb_blob.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8331330+07:00 diff --git a/shaders/sh_pb_brick/sh_pb_brick.fsh_mod b/shaders/sh_pb_brick/sh_pb_brick.fsh_mod new file mode 100644 index 000000000..f822ecfce --- /dev/null +++ b/shaders/sh_pb_brick/sh_pb_brick.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8335718+07:00 diff --git a/shaders/sh_pb_brick/sh_pb_brick.vsh_mod b/shaders/sh_pb_brick/sh_pb_brick.vsh_mod new file mode 100644 index 000000000..8090d45bc --- /dev/null +++ b/shaders/sh_pb_brick/sh_pb_brick.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8337507+07:00 diff --git a/shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh_mod b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh_mod new file mode 100644 index 000000000..9ee81aeeb --- /dev/null +++ b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8342052+07:00 diff --git a/shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh_mod b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh_mod new file mode 100644 index 000000000..2f5fac305 --- /dev/null +++ b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8343813+07:00 diff --git a/shaders/sh_pb_hash/sh_pb_hash.fsh_mod b/shaders/sh_pb_hash/sh_pb_hash.fsh_mod new file mode 100644 index 000000000..107bdc358 --- /dev/null +++ b/shaders/sh_pb_hash/sh_pb_hash.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8347972+07:00 diff --git a/shaders/sh_pb_hash/sh_pb_hash.vsh_mod b/shaders/sh_pb_hash/sh_pb_hash.vsh_mod new file mode 100644 index 000000000..37ea8866d --- /dev/null +++ b/shaders/sh_pb_hash/sh_pb_hash.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8349799+07:00 diff --git a/shaders/sh_pb_highlight/sh_pb_highlight.fsh_mod b/shaders/sh_pb_highlight/sh_pb_highlight.fsh_mod new file mode 100644 index 000000000..5fc4a4b11 --- /dev/null +++ b/shaders/sh_pb_highlight/sh_pb_highlight.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8354262+07:00 diff --git a/shaders/sh_pb_highlight/sh_pb_highlight.vsh_mod b/shaders/sh_pb_highlight/sh_pb_highlight.vsh_mod new file mode 100644 index 000000000..e2debd8b2 --- /dev/null +++ b/shaders/sh_pb_highlight/sh_pb_highlight.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8356049+07:00 diff --git a/shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh_mod b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh_mod new file mode 100644 index 000000000..039438790 --- /dev/null +++ b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8360412+07:00 diff --git a/shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh_mod b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh_mod new file mode 100644 index 000000000..d5f911ae1 --- /dev/null +++ b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8363137+07:00 diff --git a/shaders/sh_pb_outline/sh_pb_outline.fsh_mod b/shaders/sh_pb_outline/sh_pb_outline.fsh_mod new file mode 100644 index 000000000..7bc0cf1a4 --- /dev/null +++ b/shaders/sh_pb_outline/sh_pb_outline.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8367878+07:00 diff --git a/shaders/sh_pb_outline/sh_pb_outline.vsh_mod b/shaders/sh_pb_outline/sh_pb_outline.vsh_mod new file mode 100644 index 000000000..68f4bae7d --- /dev/null +++ b/shaders/sh_pb_outline/sh_pb_outline.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8369631+07:00 diff --git a/shaders/sh_pb_shade/sh_pb_shade.fsh_mod b/shaders/sh_pb_shade/sh_pb_shade.fsh_mod new file mode 100644 index 000000000..6da8a7305 --- /dev/null +++ b/shaders/sh_pb_shade/sh_pb_shade.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8381332+07:00 diff --git a/shaders/sh_pb_shade/sh_pb_shade.vsh_mod b/shaders/sh_pb_shade/sh_pb_shade.vsh_mod new file mode 100644 index 000000000..a02076122 --- /dev/null +++ b/shaders/sh_pb_shade/sh_pb_shade.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8383370+07:00 diff --git a/shaders/sh_pb_shade_half/sh_pb_shade_half.fsh_mod b/shaders/sh_pb_shade_half/sh_pb_shade_half.fsh_mod new file mode 100644 index 000000000..4b3dab7e5 --- /dev/null +++ b/shaders/sh_pb_shade_half/sh_pb_shade_half.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8375197+07:00 diff --git a/shaders/sh_pb_shade_half/sh_pb_shade_half.vsh_mod b/shaders/sh_pb_shade_half/sh_pb_shade_half.vsh_mod new file mode 100644 index 000000000..a55835112 --- /dev/null +++ b/shaders/sh_pb_shade_half/sh_pb_shade_half.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8377043+07:00 diff --git a/shaders/sh_pb_strip/sh_pb_strip.fsh_mod b/shaders/sh_pb_strip/sh_pb_strip.fsh_mod new file mode 100644 index 000000000..497d06390 --- /dev/null +++ b/shaders/sh_pb_strip/sh_pb_strip.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8388406+07:00 diff --git a/shaders/sh_pb_strip/sh_pb_strip.vsh_mod b/shaders/sh_pb_strip/sh_pb_strip.vsh_mod new file mode 100644 index 000000000..71987bf8b --- /dev/null +++ b/shaders/sh_pb_strip/sh_pb_strip.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8390259+07:00 diff --git a/shaders/sh_pb_to_mask/sh_pb_to_mask.fsh_mod b/shaders/sh_pb_to_mask/sh_pb_to_mask.fsh_mod new file mode 100644 index 000000000..d7656cb51 --- /dev/null +++ b/shaders/sh_pb_to_mask/sh_pb_to_mask.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8395470+07:00 diff --git a/shaders/sh_pb_to_mask/sh_pb_to_mask.vsh_mod b/shaders/sh_pb_to_mask/sh_pb_to_mask.vsh_mod new file mode 100644 index 000000000..7b8120fdd --- /dev/null +++ b/shaders/sh_pb_to_mask/sh_pb_to_mask.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8397231+07:00 diff --git a/shaders/sh_perlin/sh_perlin.fsh_mod b/shaders/sh_perlin/sh_perlin.fsh_mod new file mode 100644 index 000000000..5e1d0f25d --- /dev/null +++ b/shaders/sh_perlin/sh_perlin.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8425530+07:00 diff --git a/shaders/sh_perlin/sh_perlin.vsh_mod b/shaders/sh_perlin/sh_perlin.vsh_mod new file mode 100644 index 000000000..81efa4ce8 --- /dev/null +++ b/shaders/sh_perlin/sh_perlin.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8427234+07:00 diff --git a/shaders/sh_perlin_extra/sh_perlin_extra.fsh_mod b/shaders/sh_perlin_extra/sh_perlin_extra.fsh_mod new file mode 100644 index 000000000..c7615d10e --- /dev/null +++ b/shaders/sh_perlin_extra/sh_perlin_extra.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8403892+07:00 diff --git a/shaders/sh_perlin_extra/sh_perlin_extra.vsh_mod b/shaders/sh_perlin_extra/sh_perlin_extra.vsh_mod new file mode 100644 index 000000000..3bd46cf78 --- /dev/null +++ b/shaders/sh_perlin_extra/sh_perlin_extra.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8405793+07:00 diff --git a/shaders/sh_perlin_smear/sh_perlin_smear.fsh_mod b/shaders/sh_perlin_smear/sh_perlin_smear.fsh_mod new file mode 100644 index 000000000..2813973b8 --- /dev/null +++ b/shaders/sh_perlin_smear/sh_perlin_smear.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8411805+07:00 diff --git a/shaders/sh_perlin_smear/sh_perlin_smear.vsh_mod b/shaders/sh_perlin_smear/sh_perlin_smear.vsh_mod new file mode 100644 index 000000000..6345e08f9 --- /dev/null +++ b/shaders/sh_perlin_smear/sh_perlin_smear.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8413567+07:00 diff --git a/shaders/sh_perlin_tiled/sh_perlin_tiled.fsh_mod b/shaders/sh_perlin_tiled/sh_perlin_tiled.fsh_mod new file mode 100644 index 000000000..b922650ee --- /dev/null +++ b/shaders/sh_perlin_tiled/sh_perlin_tiled.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8419466+07:00 diff --git a/shaders/sh_perlin_tiled/sh_perlin_tiled.vsh_mod b/shaders/sh_perlin_tiled/sh_perlin_tiled.vsh_mod new file mode 100644 index 000000000..6ed36847f --- /dev/null +++ b/shaders/sh_perlin_tiled/sh_perlin_tiled.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8421193+07:00 diff --git a/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh_mod b/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh_mod new file mode 100644 index 000000000..aea1098d1 --- /dev/null +++ b/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8431265+07:00 diff --git a/shaders/sh_pixel_cloud/sh_pixel_cloud.vsh_mod b/shaders/sh_pixel_cloud/sh_pixel_cloud.vsh_mod new file mode 100644 index 000000000..699cf08f9 --- /dev/null +++ b/shaders/sh_pixel_cloud/sh_pixel_cloud.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8433027+07:00 diff --git a/shaders/sh_pixel_math/sh_pixel_math.fsh_mod b/shaders/sh_pixel_math/sh_pixel_math.fsh_mod new file mode 100644 index 000000000..50137b294 --- /dev/null +++ b/shaders/sh_pixel_math/sh_pixel_math.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8501446+07:00 diff --git a/shaders/sh_pixel_math/sh_pixel_math.vsh_mod b/shaders/sh_pixel_math/sh_pixel_math.vsh_mod new file mode 100644 index 000000000..8d9b05fb1 --- /dev/null +++ b/shaders/sh_pixel_math/sh_pixel_math.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8503304+07:00 diff --git a/shaders/sh_pixel_sample/sh_pixel_sample.fsh_mod b/shaders/sh_pixel_sample/sh_pixel_sample.fsh_mod new file mode 100644 index 000000000..ffdf0bafd --- /dev/null +++ b/shaders/sh_pixel_sample/sh_pixel_sample.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8507544+07:00 diff --git a/shaders/sh_pixel_sample/sh_pixel_sample.vsh_mod b/shaders/sh_pixel_sample/sh_pixel_sample.vsh_mod new file mode 100644 index 000000000..fe0087f09 --- /dev/null +++ b/shaders/sh_pixel_sample/sh_pixel_sample.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8509291+07:00 diff --git a/shaders/sh_pixel_sort/sh_pixel_sort.fsh_mod b/shaders/sh_pixel_sort/sh_pixel_sort.fsh_mod new file mode 100644 index 000000000..261684ad0 --- /dev/null +++ b/shaders/sh_pixel_sort/sh_pixel_sort.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8513679+07:00 diff --git a/shaders/sh_pixel_sort/sh_pixel_sort.vsh_mod b/shaders/sh_pixel_sort/sh_pixel_sort.vsh_mod new file mode 100644 index 000000000..440defa08 --- /dev/null +++ b/shaders/sh_pixel_sort/sh_pixel_sort.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8515615+07:00 diff --git a/shaders/sh_polar/sh_polar.fsh b/shaders/sh_polar/sh_polar.fsh index ac1e32729..1cbdcb15c 100644 --- a/shaders/sh_polar/sh_polar.fsh +++ b/shaders/sh_polar/sh_polar.fsh @@ -1,6 +1,94 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform int invert; @@ -13,79 +101,6 @@ uniform int blendUseSurf; uniform sampler2D blendSurf; uniform vec2 range; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - void main() { vec2 center = vec2(0.5, 0.5); vec2 coord; diff --git a/shaders/sh_polar/sh_polar.fsh_mod b/shaders/sh_polar/sh_polar.fsh_mod new file mode 100644 index 000000000..2fc767e24 --- /dev/null +++ b/shaders/sh_polar/sh_polar.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8520673+07:00 diff --git a/shaders/sh_polar/sh_polar.vsh_mod b/shaders/sh_polar/sh_polar.vsh_mod new file mode 100644 index 000000000..af258c1cb --- /dev/null +++ b/shaders/sh_polar/sh_polar.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8522491+07:00 diff --git a/shaders/sh_posterize/sh_posterize.fsh_mod b/shaders/sh_posterize/sh_posterize.fsh_mod new file mode 100644 index 000000000..2c582283a --- /dev/null +++ b/shaders/sh_posterize/sh_posterize.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8546061+07:00 diff --git a/shaders/sh_posterize/sh_posterize.vsh_mod b/shaders/sh_posterize/sh_posterize.vsh_mod new file mode 100644 index 000000000..5c8cf2c23 --- /dev/null +++ b/shaders/sh_posterize/sh_posterize.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8547823+07:00 diff --git a/shaders/sh_posterize_palette/sh_posterize_palette.fsh_mod b/shaders/sh_posterize_palette/sh_posterize_palette.fsh_mod new file mode 100644 index 000000000..a2ff8df0e --- /dev/null +++ b/shaders/sh_posterize_palette/sh_posterize_palette.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8534632+07:00 diff --git a/shaders/sh_posterize_palette/sh_posterize_palette.vsh_mod b/shaders/sh_posterize_palette/sh_posterize_palette.vsh_mod new file mode 100644 index 000000000..824453c64 --- /dev/null +++ b/shaders/sh_posterize_palette/sh_posterize_palette.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8536901+07:00 diff --git a/shaders/sh_preview_histogram/sh_preview_histogram.fsh_mod b/shaders/sh_preview_histogram/sh_preview_histogram.fsh_mod new file mode 100644 index 000000000..ee5381d02 --- /dev/null +++ b/shaders/sh_preview_histogram/sh_preview_histogram.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8560683+07:00 diff --git a/shaders/sh_preview_histogram/sh_preview_histogram.vsh_mod b/shaders/sh_preview_histogram/sh_preview_histogram.vsh_mod new file mode 100644 index 000000000..45f5ba1dd --- /dev/null +++ b/shaders/sh_preview_histogram/sh_preview_histogram.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8562325+07:00 diff --git a/shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.fsh_mod b/shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.fsh_mod new file mode 100644 index 000000000..c25927f3d --- /dev/null +++ b/shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8554066+07:00 diff --git a/shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.vsh_mod b/shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.vsh_mod new file mode 100644 index 000000000..4656a38e7 --- /dev/null +++ b/shaders/sh_preview_histogram_outline/sh_preview_histogram_outline.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8556109+07:00 diff --git a/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh_mod b/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh_mod new file mode 100644 index 000000000..734a0d31e --- /dev/null +++ b/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8566389+07:00 diff --git a/shaders/sh_pytagorean_tile/sh_pytagorean_tile.vsh_mod b/shaders/sh_pytagorean_tile/sh_pytagorean_tile.vsh_mod new file mode 100644 index 000000000..6c2f0cca0 --- /dev/null +++ b/shaders/sh_pytagorean_tile/sh_pytagorean_tile.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8568607+07:00 diff --git a/shaders/sh_quarsicrystal/sh_quarsicrystal.fsh_mod b/shaders/sh_quarsicrystal/sh_quarsicrystal.fsh_mod new file mode 100644 index 000000000..74c771848 --- /dev/null +++ b/shaders/sh_quarsicrystal/sh_quarsicrystal.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8573841+07:00 diff --git a/shaders/sh_quarsicrystal/sh_quarsicrystal.vsh_mod b/shaders/sh_quarsicrystal/sh_quarsicrystal.vsh_mod new file mode 100644 index 000000000..cf87c215e --- /dev/null +++ b/shaders/sh_quarsicrystal/sh_quarsicrystal.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8575856+07:00 diff --git a/shaders/sh_random_tile/sh_random_tile.fsh_mod b/shaders/sh_random_tile/sh_random_tile.fsh_mod new file mode 100644 index 000000000..a23233190 --- /dev/null +++ b/shaders/sh_random_tile/sh_random_tile.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8580452+07:00 diff --git a/shaders/sh_random_tile/sh_random_tile.vsh_mod b/shaders/sh_random_tile/sh_random_tile.vsh_mod new file mode 100644 index 000000000..01eeca143 --- /dev/null +++ b/shaders/sh_random_tile/sh_random_tile.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8582148+07:00 diff --git a/shaders/sh_rd_add/sh_rd_add.fsh_mod b/shaders/sh_rd_add/sh_rd_add.fsh_mod new file mode 100644 index 000000000..f4f5d56b4 --- /dev/null +++ b/shaders/sh_rd_add/sh_rd_add.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8586310+07:00 diff --git a/shaders/sh_rd_add/sh_rd_add.vsh_mod b/shaders/sh_rd_add/sh_rd_add.vsh_mod new file mode 100644 index 000000000..afa4f41c7 --- /dev/null +++ b/shaders/sh_rd_add/sh_rd_add.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8588000+07:00 diff --git a/shaders/sh_rd_convert/sh_rd_convert.fsh_mod b/shaders/sh_rd_convert/sh_rd_convert.fsh_mod new file mode 100644 index 000000000..5996f3cc5 --- /dev/null +++ b/shaders/sh_rd_convert/sh_rd_convert.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8592338+07:00 diff --git a/shaders/sh_rd_convert/sh_rd_convert.vsh_mod b/shaders/sh_rd_convert/sh_rd_convert.vsh_mod new file mode 100644 index 000000000..d31159f21 --- /dev/null +++ b/shaders/sh_rd_convert/sh_rd_convert.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8594296+07:00 diff --git a/shaders/sh_rd_propagate/sh_rd_propagate.fsh_mod b/shaders/sh_rd_propagate/sh_rd_propagate.fsh_mod new file mode 100644 index 000000000..92303c582 --- /dev/null +++ b/shaders/sh_rd_propagate/sh_rd_propagate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8598904+07:00 diff --git a/shaders/sh_rd_propagate/sh_rd_propagate.vsh_mod b/shaders/sh_rd_propagate/sh_rd_propagate.vsh_mod new file mode 100644 index 000000000..0e4c93db4 --- /dev/null +++ b/shaders/sh_rd_propagate/sh_rd_propagate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8600819+07:00 diff --git a/shaders/sh_rd_render/sh_rd_render.fsh_mod b/shaders/sh_rd_render/sh_rd_render.fsh_mod new file mode 100644 index 000000000..909150c5d --- /dev/null +++ b/shaders/sh_rd_render/sh_rd_render.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8605526+07:00 diff --git a/shaders/sh_rd_render/sh_rd_render.vsh_mod b/shaders/sh_rd_render/sh_rd_render.vsh_mod new file mode 100644 index 000000000..7e35e3b30 --- /dev/null +++ b/shaders/sh_rd_render/sh_rd_render.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8607549+07:00 diff --git a/shaders/sh_region_fill_border/sh_region_fill_border.fsh_mod b/shaders/sh_region_fill_border/sh_region_fill_border.fsh_mod new file mode 100644 index 000000000..d85c9c833 --- /dev/null +++ b/shaders/sh_region_fill_border/sh_region_fill_border.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8612571+07:00 diff --git a/shaders/sh_region_fill_border/sh_region_fill_border.vsh_mod b/shaders/sh_region_fill_border/sh_region_fill_border.vsh_mod new file mode 100644 index 000000000..a59103fe6 --- /dev/null +++ b/shaders/sh_region_fill_border/sh_region_fill_border.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8615024+07:00 diff --git a/shaders/sh_region_fill_color/sh_region_fill_color.fsh_mod b/shaders/sh_region_fill_color/sh_region_fill_color.fsh_mod new file mode 100644 index 000000000..9bc4dcebd --- /dev/null +++ b/shaders/sh_region_fill_color/sh_region_fill_color.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-19T10:57:39.0302438+07:00 diff --git a/shaders/sh_region_fill_color/sh_region_fill_color.vsh_mod b/shaders/sh_region_fill_color/sh_region_fill_color.vsh_mod new file mode 100644 index 000000000..8623da3f2 --- /dev/null +++ b/shaders/sh_region_fill_color/sh_region_fill_color.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8621874+07:00 diff --git a/shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.fsh_mod b/shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.fsh_mod new file mode 100644 index 000000000..5a345d70c --- /dev/null +++ b/shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8644060+07:00 diff --git a/shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.vsh_mod b/shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.vsh_mod new file mode 100644 index 000000000..54c652c90 --- /dev/null +++ b/shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8646033+07:00 diff --git a/shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.fsh_mod b/shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.fsh_mod new file mode 100644 index 000000000..aeeec93da --- /dev/null +++ b/shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8632575+07:00 diff --git a/shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.vsh_mod b/shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.vsh_mod new file mode 100644 index 000000000..58706a562 --- /dev/null +++ b/shaders/sh_region_fill_coordinate_all/sh_region_fill_coordinate_all.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8634299+07:00 diff --git a/shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.fsh_mod b/shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.fsh_mod new file mode 100644 index 000000000..3fae7f17e --- /dev/null +++ b/shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8626380+07:00 diff --git a/shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.vsh_mod b/shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.vsh_mod new file mode 100644 index 000000000..e4e0453e7 --- /dev/null +++ b/shaders/sh_region_fill_coordinate_all_init/sh_region_fill_coordinate_all_init.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8628231+07:00 diff --git a/shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.fsh_mod b/shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.fsh_mod new file mode 100644 index 000000000..a8ac9617e --- /dev/null +++ b/shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8638385+07:00 diff --git a/shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.vsh_mod b/shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.vsh_mod new file mode 100644 index 000000000..d73d60c89 --- /dev/null +++ b/shaders/sh_region_fill_coordinate_init/sh_region_fill_coordinate_init.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8640070+07:00 diff --git a/shaders/sh_region_fill_init/sh_region_fill_init.fsh_mod b/shaders/sh_region_fill_init/sh_region_fill_init.fsh_mod new file mode 100644 index 000000000..869883bd0 --- /dev/null +++ b/shaders/sh_region_fill_init/sh_region_fill_init.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8650162+07:00 diff --git a/shaders/sh_region_fill_init/sh_region_fill_init.vsh_mod b/shaders/sh_region_fill_init/sh_region_fill_init.vsh_mod new file mode 100644 index 000000000..0e2fa4cee --- /dev/null +++ b/shaders/sh_region_fill_init/sh_region_fill_init.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8651757+07:00 diff --git a/shaders/sh_region_fill_inner/sh_region_fill_inner.fsh_mod b/shaders/sh_region_fill_inner/sh_region_fill_inner.fsh_mod new file mode 100644 index 000000000..79eaa71da --- /dev/null +++ b/shaders/sh_region_fill_inner/sh_region_fill_inner.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8661526+07:00 diff --git a/shaders/sh_region_fill_inner/sh_region_fill_inner.vsh_mod b/shaders/sh_region_fill_inner/sh_region_fill_inner.vsh_mod new file mode 100644 index 000000000..64e8315e1 --- /dev/null +++ b/shaders/sh_region_fill_inner/sh_region_fill_inner.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8663090+07:00 diff --git a/shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.fsh_mod b/shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.fsh_mod new file mode 100644 index 000000000..2905678c9 --- /dev/null +++ b/shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8655777+07:00 diff --git a/shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.vsh_mod b/shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.vsh_mod new file mode 100644 index 000000000..294eb20e6 --- /dev/null +++ b/shaders/sh_region_fill_inner_remove/sh_region_fill_inner_remove.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8657424+07:00 diff --git a/shaders/sh_region_fill_map/sh_region_fill_map.fsh_mod b/shaders/sh_region_fill_map/sh_region_fill_map.fsh_mod new file mode 100644 index 000000000..abb41df0d --- /dev/null +++ b/shaders/sh_region_fill_map/sh_region_fill_map.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8667482+07:00 diff --git a/shaders/sh_region_fill_map/sh_region_fill_map.vsh_mod b/shaders/sh_region_fill_map/sh_region_fill_map.vsh_mod new file mode 100644 index 000000000..4a24b63d5 --- /dev/null +++ b/shaders/sh_region_fill_map/sh_region_fill_map.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8669063+07:00 diff --git a/shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.fsh_mod b/shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.fsh_mod new file mode 100644 index 000000000..cfad9d470 --- /dev/null +++ b/shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8672833+07:00 diff --git a/shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.vsh_mod b/shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.vsh_mod new file mode 100644 index 000000000..8c07a326e --- /dev/null +++ b/shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8674406+07:00 diff --git a/shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.fsh_mod b/shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.fsh_mod new file mode 100644 index 000000000..b87ccbc33 --- /dev/null +++ b/shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8679294+07:00 diff --git a/shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.vsh_mod b/shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.vsh_mod new file mode 100644 index 000000000..0bd9e10d9 --- /dev/null +++ b/shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8681248+07:00 diff --git a/shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.fsh_mod b/shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.fsh_mod new file mode 100644 index 000000000..ee76ed9af --- /dev/null +++ b/shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8685337+07:00 diff --git a/shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.vsh_mod b/shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.vsh_mod new file mode 100644 index 000000000..55f025d89 --- /dev/null +++ b/shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8686943+07:00 diff --git a/shaders/sh_remove_black/sh_remove_black.fsh_mod b/shaders/sh_remove_black/sh_remove_black.fsh_mod new file mode 100644 index 000000000..8544bbd42 --- /dev/null +++ b/shaders/sh_remove_black/sh_remove_black.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8691090+07:00 diff --git a/shaders/sh_remove_black/sh_remove_black.vsh_mod b/shaders/sh_remove_black/sh_remove_black.vsh_mod new file mode 100644 index 000000000..9793b5492 --- /dev/null +++ b/shaders/sh_remove_black/sh_remove_black.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8692674+07:00 diff --git a/shaders/sh_replace_color/sh_replace_color.fsh_mod b/shaders/sh_replace_color/sh_replace_color.fsh_mod new file mode 100644 index 000000000..36b43c792 --- /dev/null +++ b/shaders/sh_replace_color/sh_replace_color.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8696685+07:00 diff --git a/shaders/sh_replace_color/sh_replace_color.vsh_mod b/shaders/sh_replace_color/sh_replace_color.vsh_mod new file mode 100644 index 000000000..fb80044c4 --- /dev/null +++ b/shaders/sh_replace_color/sh_replace_color.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8699758+07:00 diff --git a/shaders/sh_rim/sh_rim.fsh_mod b/shaders/sh_rim/sh_rim.fsh_mod new file mode 100644 index 000000000..1a1384500 --- /dev/null +++ b/shaders/sh_rim/sh_rim.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8705725+07:00 diff --git a/shaders/sh_rim/sh_rim.vsh_mod b/shaders/sh_rim/sh_rim.vsh_mod new file mode 100644 index 000000000..b8a518c16 --- /dev/null +++ b/shaders/sh_rim/sh_rim.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8707375+07:00 diff --git a/shaders/sh_rm_cloud/sh_rm_cloud.fsh_mod b/shaders/sh_rm_cloud/sh_rm_cloud.fsh_mod new file mode 100644 index 000000000..8b5e5482e --- /dev/null +++ b/shaders/sh_rm_cloud/sh_rm_cloud.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8711613+07:00 diff --git a/shaders/sh_rm_cloud/sh_rm_cloud.vsh_mod b/shaders/sh_rm_cloud/sh_rm_cloud.vsh_mod new file mode 100644 index 000000000..d0a846885 --- /dev/null +++ b/shaders/sh_rm_cloud/sh_rm_cloud.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8713775+07:00 diff --git a/shaders/sh_rm_primitive/sh_rm_primitive.fsh_mod b/shaders/sh_rm_primitive/sh_rm_primitive.fsh_mod new file mode 100644 index 000000000..da9b49939 --- /dev/null +++ b/shaders/sh_rm_primitive/sh_rm_primitive.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8718070+07:00 diff --git a/shaders/sh_rm_primitive/sh_rm_primitive.vsh_mod b/shaders/sh_rm_primitive/sh_rm_primitive.vsh_mod new file mode 100644 index 000000000..247587260 --- /dev/null +++ b/shaders/sh_rm_primitive/sh_rm_primitive.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8719838+07:00 diff --git a/shaders/sh_rm_terrain/sh_rm_terrain.fsh_mod b/shaders/sh_rm_terrain/sh_rm_terrain.fsh_mod new file mode 100644 index 000000000..2d3b079ab --- /dev/null +++ b/shaders/sh_rm_terrain/sh_rm_terrain.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8723889+07:00 diff --git a/shaders/sh_rm_terrain/sh_rm_terrain.vsh_mod b/shaders/sh_rm_terrain/sh_rm_terrain.vsh_mod new file mode 100644 index 000000000..9a55d77ad --- /dev/null +++ b/shaders/sh_rm_terrain/sh_rm_terrain.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8725596+07:00 diff --git a/shaders/sh_rsh_corner/sh_rsh_corner.fsh_mod b/shaders/sh_rsh_corner/sh_rsh_corner.fsh_mod new file mode 100644 index 000000000..840263818 --- /dev/null +++ b/shaders/sh_rsh_corner/sh_rsh_corner.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8730002+07:00 diff --git a/shaders/sh_rsh_corner/sh_rsh_corner.vsh_mod b/shaders/sh_rsh_corner/sh_rsh_corner.vsh_mod new file mode 100644 index 000000000..05f3543fb --- /dev/null +++ b/shaders/sh_rsh_corner/sh_rsh_corner.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8731941+07:00 diff --git a/shaders/sh_rsh_erode/sh_rsh_erode.fsh_mod b/shaders/sh_rsh_erode/sh_rsh_erode.fsh_mod new file mode 100644 index 000000000..e26838e01 --- /dev/null +++ b/shaders/sh_rsh_erode/sh_rsh_erode.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8736368+07:00 diff --git a/shaders/sh_rsh_erode/sh_rsh_erode.vsh_mod b/shaders/sh_rsh_erode/sh_rsh_erode.vsh_mod new file mode 100644 index 000000000..0e3149ac2 --- /dev/null +++ b/shaders/sh_rsh_erode/sh_rsh_erode.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8738420+07:00 diff --git a/shaders/sh_rsh_rotate/sh_rsh_rotate.fsh_mod b/shaders/sh_rsh_rotate/sh_rsh_rotate.fsh_mod new file mode 100644 index 000000000..0f8a46e83 --- /dev/null +++ b/shaders/sh_rsh_rotate/sh_rsh_rotate.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8742590+07:00 diff --git a/shaders/sh_rsh_rotate/sh_rsh_rotate.vsh_mod b/shaders/sh_rsh_rotate/sh_rsh_rotate.vsh_mod new file mode 100644 index 000000000..a75b8d15b --- /dev/null +++ b/shaders/sh_rsh_rotate/sh_rsh_rotate.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8744317+07:00 diff --git a/shaders/sh_sample/sh_sample.fsh b/shaders/sh_sample/sh_sample.fsh index c0a414f2b..c4aa7dc1f 100644 --- a/shaders/sh_sample/sh_sample.fsh +++ b/shaders/sh_sample/sh_sample.fsh @@ -1,79 +1,97 @@ -varying vec2 v_vTexcoord; -varying vec4 v_vColour; +#pragma use(sampler) -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; +#region -- sampler -- [1729740697.9444373] uniform int interpolation; uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - + uniform int sampleMode; + + const float PI = 3.14159265358979323846; float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { uv = uv * sampleDimension + 0.5; vec2 iuv = floor( uv ); vec2 fuv = fract( uv ); uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); return texture2D( texture, uv ); } -#endregion /////////////// SAMPLING /////////////// + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; void main() { - gl_FragColor = texture2Dintp( gm_BaseTexture, v_vTexcoord ) * v_vColour; + gl_FragColor = sampleTexture( gm_BaseTexture, v_vTexcoord ) * v_vColour; } \ No newline at end of file diff --git a/shaders/sh_sample/sh_sample.fsh_mod b/shaders/sh_sample/sh_sample.fsh_mod new file mode 100644 index 000000000..89f8a3546 --- /dev/null +++ b/shaders/sh_sample/sh_sample.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-24T08:51:26.5843168+07:00 diff --git a/shaders/sh_sample/sh_sample.vsh_mod b/shaders/sh_sample/sh_sample.vsh_mod new file mode 100644 index 000000000..c94b34948 --- /dev/null +++ b/shaders/sh_sample/sh_sample.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8756832+07:00 diff --git a/shaders/sh_sample_points/sh_sample_points.fsh_mod b/shaders/sh_sample_points/sh_sample_points.fsh_mod new file mode 100644 index 000000000..63cfe37be --- /dev/null +++ b/shaders/sh_sample_points/sh_sample_points.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8748776+07:00 diff --git a/shaders/sh_sample_points/sh_sample_points.vsh_mod b/shaders/sh_sample_points/sh_sample_points.vsh_mod new file mode 100644 index 000000000..226aad4cb --- /dev/null +++ b/shaders/sh_sample_points/sh_sample_points.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8750612+07:00 diff --git a/shaders/sh_sao/sh_sao.fsh_mod b/shaders/sh_sao/sh_sao.fsh_mod new file mode 100644 index 000000000..8c44a6587 --- /dev/null +++ b/shaders/sh_sao/sh_sao.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8760932+07:00 diff --git a/shaders/sh_sao/sh_sao.vsh_mod b/shaders/sh_sao/sh_sao.vsh_mod new file mode 100644 index 000000000..f8a1e790c --- /dev/null +++ b/shaders/sh_sao/sh_sao.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8762680+07:00 diff --git a/shaders/sh_scale2x/sh_scale2x.fsh_mod b/shaders/sh_scale2x/sh_scale2x.fsh_mod new file mode 100644 index 000000000..4d2c2fde5 --- /dev/null +++ b/shaders/sh_scale2x/sh_scale2x.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8772608+07:00 diff --git a/shaders/sh_scale2x/sh_scale2x.vsh_mod b/shaders/sh_scale2x/sh_scale2x.vsh_mod new file mode 100644 index 000000000..4cfd496c4 --- /dev/null +++ b/shaders/sh_scale2x/sh_scale2x.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8774428+07:00 diff --git a/shaders/sh_scale3x/sh_scale3x.fsh_mod b/shaders/sh_scale3x/sh_scale3x.fsh_mod new file mode 100644 index 000000000..8acb73ee4 --- /dev/null +++ b/shaders/sh_scale3x/sh_scale3x.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8779617+07:00 diff --git a/shaders/sh_scale3x/sh_scale3x.vsh_mod b/shaders/sh_scale3x/sh_scale3x.vsh_mod new file mode 100644 index 000000000..4554797dd --- /dev/null +++ b/shaders/sh_scale3x/sh_scale3x.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8781683+07:00 diff --git a/shaders/sh_scale_cleanedge/sh_scale_cleanedge.fsh_mod b/shaders/sh_scale_cleanedge/sh_scale_cleanedge.fsh_mod new file mode 100644 index 000000000..622bdbd98 --- /dev/null +++ b/shaders/sh_scale_cleanedge/sh_scale_cleanedge.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8766917+07:00 diff --git a/shaders/sh_scale_cleanedge/sh_scale_cleanedge.vsh_mod b/shaders/sh_scale_cleanedge/sh_scale_cleanedge.vsh_mod new file mode 100644 index 000000000..910e4433f --- /dev/null +++ b/shaders/sh_scale_cleanedge/sh_scale_cleanedge.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8768638+07:00 diff --git a/shaders/sh_sdf/sh_sdf.fsh_mod b/shaders/sh_sdf/sh_sdf.fsh_mod new file mode 100644 index 000000000..a28b8634e --- /dev/null +++ b/shaders/sh_sdf/sh_sdf.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8802289+07:00 diff --git a/shaders/sh_sdf/sh_sdf.vsh_mod b/shaders/sh_sdf/sh_sdf.vsh_mod new file mode 100644 index 000000000..c2d50ccbf --- /dev/null +++ b/shaders/sh_sdf/sh_sdf.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8804362+07:00 diff --git a/shaders/sh_sdf_dist/sh_sdf_dist.fsh_mod b/shaders/sh_sdf_dist/sh_sdf_dist.fsh_mod new file mode 100644 index 000000000..dcb96f9f5 --- /dev/null +++ b/shaders/sh_sdf_dist/sh_sdf_dist.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8787310+07:00 diff --git a/shaders/sh_sdf_dist/sh_sdf_dist.vsh_mod b/shaders/sh_sdf_dist/sh_sdf_dist.vsh_mod new file mode 100644 index 000000000..7068792e0 --- /dev/null +++ b/shaders/sh_sdf_dist/sh_sdf_dist.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8789858+07:00 diff --git a/shaders/sh_sdf_tex/sh_sdf_tex.fsh_mod b/shaders/sh_sdf_tex/sh_sdf_tex.fsh_mod new file mode 100644 index 000000000..4cb2c499f --- /dev/null +++ b/shaders/sh_sdf_tex/sh_sdf_tex.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8795178+07:00 diff --git a/shaders/sh_sdf_tex/sh_sdf_tex.vsh_mod b/shaders/sh_sdf_tex/sh_sdf_tex.vsh_mod new file mode 100644 index 000000000..361112979 --- /dev/null +++ b/shaders/sh_sdf_tex/sh_sdf_tex.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8796964+07:00 diff --git a/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.fsh_mod b/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.fsh_mod new file mode 100644 index 000000000..f20e8e49b --- /dev/null +++ b/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8809287+07:00 diff --git a/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.vsh_mod b/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.vsh_mod new file mode 100644 index 000000000..402a91b24 --- /dev/null +++ b/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8811171+07:00 diff --git a/shaders/sh_seperate_shape_index/sh_seperate_shape_index.fsh_mod b/shaders/sh_seperate_shape_index/sh_seperate_shape_index.fsh_mod new file mode 100644 index 000000000..a23a052bc --- /dev/null +++ b/shaders/sh_seperate_shape_index/sh_seperate_shape_index.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8818069+07:00 diff --git a/shaders/sh_seperate_shape_index/sh_seperate_shape_index.vsh_mod b/shaders/sh_seperate_shape_index/sh_seperate_shape_index.vsh_mod new file mode 100644 index 000000000..c2bb36461 --- /dev/null +++ b/shaders/sh_seperate_shape_index/sh_seperate_shape_index.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8819801+07:00 diff --git a/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.fsh_mod b/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.fsh_mod new file mode 100644 index 000000000..a7cd30773 --- /dev/null +++ b/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8824128+07:00 diff --git a/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.vsh_mod b/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.vsh_mod new file mode 100644 index 000000000..392b775c6 --- /dev/null +++ b/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8825954+07:00 diff --git a/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.fsh_mod b/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.fsh_mod new file mode 100644 index 000000000..9c6139f7b --- /dev/null +++ b/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8830788+07:00 diff --git a/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.vsh_mod b/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.vsh_mod new file mode 100644 index 000000000..e05df72a6 --- /dev/null +++ b/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8832535+07:00 diff --git a/shaders/sh_shadow_cast/sh_shadow_cast.fsh_mod b/shaders/sh_shadow_cast/sh_shadow_cast.fsh_mod new file mode 100644 index 000000000..b41faae7c --- /dev/null +++ b/shaders/sh_shadow_cast/sh_shadow_cast.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8843144+07:00 diff --git a/shaders/sh_shadow_cast/sh_shadow_cast.vsh_mod b/shaders/sh_shadow_cast/sh_shadow_cast.vsh_mod new file mode 100644 index 000000000..8673ebc91 --- /dev/null +++ b/shaders/sh_shadow_cast/sh_shadow_cast.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8844834+07:00 diff --git a/shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.fsh_mod b/shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.fsh_mod new file mode 100644 index 000000000..e77b8ca8e --- /dev/null +++ b/shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8837070+07:00 diff --git a/shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.vsh_mod b/shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.vsh_mod new file mode 100644 index 000000000..1e5bdf801 --- /dev/null +++ b/shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8838759+07:00 diff --git a/shaders/sh_shape/sh_shape.fsh_mod b/shaders/sh_shape/sh_shape.fsh_mod new file mode 100644 index 000000000..1c9a520cd --- /dev/null +++ b/shaders/sh_shape/sh_shape.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8862836+07:00 diff --git a/shaders/sh_shape/sh_shape.vsh_mod b/shaders/sh_shape/sh_shape.vsh_mod new file mode 100644 index 000000000..c2dcd5376 --- /dev/null +++ b/shaders/sh_shape/sh_shape.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8865140+07:00 diff --git a/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh b/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh index 3895159d7..57c3612c2 100644 --- a/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh +++ b/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + #define PI 3.141592653589793 #define TAU 6.283185307179586 @@ -8,78 +99,6 @@ uniform vec2 scale; uniform float txScale; uniform float angle; -#region /////////////// SAMPLING /////////////// - - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - void main() { gl_FragColor = vec4(0.); diff --git a/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh_mod b/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh_mod new file mode 100644 index 000000000..9fc98c5f8 --- /dev/null +++ b/shaders/sh_shape_map_circle/sh_shape_map_circle.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8849794+07:00 diff --git a/shaders/sh_shape_map_circle/sh_shape_map_circle.vsh_mod b/shaders/sh_shape_map_circle/sh_shape_map_circle.vsh_mod new file mode 100644 index 000000000..bcfc5947f --- /dev/null +++ b/shaders/sh_shape_map_circle/sh_shape_map_circle.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8851521+07:00 diff --git a/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh b/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh index ac663f530..0b44ca4cd 100644 --- a/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh +++ b/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + #define PI 3.141592653589793 #define TAU 6.283185307179586 @@ -9,78 +100,6 @@ uniform float sides; uniform float txScale; uniform float angle; -#region /////////////// SAMPLING /////////////// - - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - void main() { gl_FragColor = vec4(0.); diff --git a/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh_mod b/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh_mod new file mode 100644 index 000000000..367fc1352 --- /dev/null +++ b/shaders/sh_shape_map_polygon/sh_shape_map_polygon.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8855777+07:00 diff --git a/shaders/sh_shape_map_polygon/sh_shape_map_polygon.vsh_mod b/shaders/sh_shape_map_polygon/sh_shape_map_polygon.vsh_mod new file mode 100644 index 000000000..c17b17bb8 --- /dev/null +++ b/shaders/sh_shape_map_polygon/sh_shape_map_polygon.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8857616+07:00 diff --git a/shaders/sh_simplex/sh_simplex.fsh_mod b/shaders/sh_simplex/sh_simplex.fsh_mod new file mode 100644 index 000000000..2c5121e16 --- /dev/null +++ b/shaders/sh_simplex/sh_simplex.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8870208+07:00 diff --git a/shaders/sh_simplex/sh_simplex.vsh_mod b/shaders/sh_simplex/sh_simplex.vsh_mod new file mode 100644 index 000000000..c9f7573b1 --- /dev/null +++ b/shaders/sh_simplex/sh_simplex.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8872003+07:00 diff --git a/shaders/sh_skew/sh_skew.fsh b/shaders/sh_skew/sh_skew.fsh index 4eefeb444..8fb6e9345 100644 --- a/shaders/sh_skew/sh_skew.fsh +++ b/shaders/sh_skew/sh_skew.fsh @@ -1,6 +1,94 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -12,99 +100,6 @@ uniform vec2 amount; uniform int amountUseSurf; uniform sampler2D amountSurf; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; -uniform int sampleMode; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2Dintp(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float amo = amount.x; if(amountUseSurf == 1) { @@ -118,5 +113,5 @@ void main() { if(axis == 0) pos.x += (pos.y - cnt.y) * amo; else pos.y += (pos.x - cnt.x) * amo; - gl_FragColor = sampleTexture( pos ); + gl_FragColor = sampleTexture( gm_BaseTexture, pos ); } \ No newline at end of file diff --git a/shaders/sh_skew/sh_skew.fsh_mod b/shaders/sh_skew/sh_skew.fsh_mod new file mode 100644 index 000000000..0d98300a3 --- /dev/null +++ b/shaders/sh_skew/sh_skew.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8876199+07:00 diff --git a/shaders/sh_skew/sh_skew.vsh_mod b/shaders/sh_skew/sh_skew.vsh_mod new file mode 100644 index 000000000..298e06aea --- /dev/null +++ b/shaders/sh_skew/sh_skew.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8878097+07:00 diff --git a/shaders/sh_sky_hosek/sh_sky_hosek.fsh_mod b/shaders/sh_sky_hosek/sh_sky_hosek.fsh_mod new file mode 100644 index 000000000..823f5b999 --- /dev/null +++ b/shaders/sh_sky_hosek/sh_sky_hosek.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T16:42:43.5511197+07:00 diff --git a/shaders/sh_sky_hosek/sh_sky_hosek.vsh_mod b/shaders/sh_sky_hosek/sh_sky_hosek.vsh_mod new file mode 100644 index 000000000..aac549fae --- /dev/null +++ b/shaders/sh_sky_hosek/sh_sky_hosek.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T15:56:43.4560803+07:00 diff --git a/shaders/sh_sky_preetham/sh_sky_preetham.fsh_mod b/shaders/sh_sky_preetham/sh_sky_preetham.fsh_mod new file mode 100644 index 000000000..d88287927 --- /dev/null +++ b/shaders/sh_sky_preetham/sh_sky_preetham.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T16:44:18.1955544+07:00 diff --git a/shaders/sh_sky_preetham/sh_sky_preetham.vsh_mod b/shaders/sh_sky_preetham/sh_sky_preetham.vsh_mod new file mode 100644 index 000000000..c67819340 --- /dev/null +++ b/shaders/sh_sky_preetham/sh_sky_preetham.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T14:24:59.8033834+07:00 diff --git a/shaders/sh_sky_scattering/sh_sky_scattering.fsh_mod b/shaders/sh_sky_scattering/sh_sky_scattering.fsh_mod new file mode 100644 index 000000000..253aef715 --- /dev/null +++ b/shaders/sh_sky_scattering/sh_sky_scattering.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T16:39:59.4546788+07:00 diff --git a/shaders/sh_sky_scattering/sh_sky_scattering.vsh_mod b/shaders/sh_sky_scattering/sh_sky_scattering.vsh_mod new file mode 100644 index 000000000..11e55bb5e --- /dev/null +++ b/shaders/sh_sky_scattering/sh_sky_scattering.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-20T15:22:32.5310553+07:00 diff --git a/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh_mod b/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh_mod new file mode 100644 index 000000000..dd88d367d --- /dev/null +++ b/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8882930+07:00 diff --git a/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.vsh_mod b/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.vsh_mod new file mode 100644 index 000000000..dcb244062 --- /dev/null +++ b/shaders/sh_slice_spritesheet_empty_scan/sh_slice_spritesheet_empty_scan.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8885030+07:00 diff --git a/shaders/sh_smear/sh_smear.fsh b/shaders/sh_smear/sh_smear.fsh index 2ae6596a9..81a6d3c4f 100644 --- a/shaders/sh_smear/sh_smear.fsh +++ b/shaders/sh_smear/sh_smear.fsh @@ -1,3 +1,21 @@ +#pragma use(sampler_simple) + +#region -- sampler_simple -- [1729740692.1417658] + uniform int sampleMode; + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2D(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2D(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler_simple -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -13,36 +31,16 @@ uniform int strengthUseSurf; uniform sampler2D strengthSurf; uniform vec2 dimension; -uniform int sampleMode; uniform int alpha; uniform int modulateStr; uniform int inv; uniform int blend; uniform int normalized; -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2D(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2D(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - vec4 smear(vec2 shift) { float delta = 1. / size; - vec4 base = sampleTexture( v_vTexcoord ); + vec4 base = sampleTexture( gm_BaseTexture, v_vTexcoord ); float mBri = (base.r + base.g + base.b) / 3. * base.a; vec4 res, col, rcol; float bright, rbright, dist = 0.; @@ -51,14 +49,14 @@ vec4 smear(vec2 shift) { res = base; for(float i = 0.; i <= 1.0; i += delta) { - col = sampleTexture( v_vTexcoord - shift * i); + col = sampleTexture( gm_BaseTexture, v_vTexcoord - shift * i); if(modulateStr != 2) { if(alpha == 0) col.rgb *= 1. - i; else col.a *= 1. - i; } - bright = (col.r + col.g + col.b) / 3. * col.a; + bright = (col.r + col.g + col.b) / 3. * col.a; if(bright > mBri) { mBri = bright; @@ -77,7 +75,7 @@ vec4 smear(vec2 shift) { res = base; for(float i = 0.; i <= 1.; i += delta) { - col = sampleTexture( v_vTexcoord + shift * i); + col = sampleTexture( gm_BaseTexture, v_vTexcoord + shift * i); bright = (col.r + col.g + col.b) / 3. * col.a; if(bright == 0.) continue; diff --git a/shaders/sh_smear/sh_smear.fsh_mod b/shaders/sh_smear/sh_smear.fsh_mod new file mode 100644 index 000000000..8d63f6759 --- /dev/null +++ b/shaders/sh_smear/sh_smear.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8889326+07:00 diff --git a/shaders/sh_smear/sh_smear.vsh_mod b/shaders/sh_smear/sh_smear.vsh_mod new file mode 100644 index 000000000..742782186 --- /dev/null +++ b/shaders/sh_smear/sh_smear.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8891235+07:00 diff --git a/shaders/sh_solid/sh_solid.fsh_mod b/shaders/sh_solid/sh_solid.fsh_mod new file mode 100644 index 000000000..b3a6238bf --- /dev/null +++ b/shaders/sh_solid/sh_solid.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8895397+07:00 diff --git a/shaders/sh_solid/sh_solid.vsh_mod b/shaders/sh_solid/sh_solid.vsh_mod new file mode 100644 index 000000000..940720197 --- /dev/null +++ b/shaders/sh_solid/sh_solid.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8897106+07:00 diff --git a/shaders/sh_spherize/sh_spherize.fsh b/shaders/sh_spherize/sh_spherize.fsh index a898518ba..18d1b090a 100644 --- a/shaders/sh_spherize/sh_spherize.fsh +++ b/shaders/sh_spherize/sh_spherize.fsh @@ -1,12 +1,99 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 dimension; uniform vec2 center; -uniform int sampleMode; uniform vec2 radius; uniform int radiusUseSurf; @@ -18,98 +105,6 @@ uniform sampler2D strengthSurf; uniform float trim; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2Dintp(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float rad = radius.x; if(radiusUseSurf == 1) { @@ -127,7 +122,7 @@ void main() { vec2 uv = (v_vTexcoord - cen); float d = 1. - dot(uv, uv) / rad; float dist = sqrt(abs(d)); - vec4 c = sampleTexture(mix(uv, cen + uv / dist, str)); + vec4 c = sampleTexture(gm_BaseTexture, mix(uv, cen + uv / dist, str)); gl_FragColor = vec4(0.); if(d > trim) gl_FragColor = c; diff --git a/shaders/sh_spherize/sh_spherize.fsh_mod b/shaders/sh_spherize/sh_spherize.fsh_mod new file mode 100644 index 000000000..78be657e6 --- /dev/null +++ b/shaders/sh_spherize/sh_spherize.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8902146+07:00 diff --git a/shaders/sh_spherize/sh_spherize.vsh_mod b/shaders/sh_spherize/sh_spherize.vsh_mod new file mode 100644 index 000000000..16bdb8327 --- /dev/null +++ b/shaders/sh_spherize/sh_spherize.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8903975+07:00 diff --git a/shaders/sh_stripe/sh_stripe.fsh_mod b/shaders/sh_stripe/sh_stripe.fsh_mod new file mode 100644 index 000000000..ac4253859 --- /dev/null +++ b/shaders/sh_stripe/sh_stripe.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8910171+07:00 diff --git a/shaders/sh_stripe/sh_stripe.vsh_mod b/shaders/sh_stripe/sh_stripe.vsh_mod new file mode 100644 index 000000000..3126d4e64 --- /dev/null +++ b/shaders/sh_stripe/sh_stripe.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8912092+07:00 diff --git a/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.fsh_mod b/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.fsh_mod new file mode 100644 index 000000000..9a2b641a0 --- /dev/null +++ b/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8916650+07:00 diff --git a/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.vsh_mod b/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.vsh_mod new file mode 100644 index 000000000..818061bce --- /dev/null +++ b/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8918658+07:00 diff --git a/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.fsh_mod b/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.fsh_mod new file mode 100644 index 000000000..0e3fed89d --- /dev/null +++ b/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8923864+07:00 diff --git a/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.vsh_mod b/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.vsh_mod new file mode 100644 index 000000000..4f1f3cf19 --- /dev/null +++ b/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8926021+07:00 diff --git a/shaders/sh_surface_replace_find/sh_surface_replace_find.fsh_mod b/shaders/sh_surface_replace_find/sh_surface_replace_find.fsh_mod new file mode 100644 index 000000000..271be36f4 --- /dev/null +++ b/shaders/sh_surface_replace_find/sh_surface_replace_find.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8930508+07:00 diff --git a/shaders/sh_surface_replace_find/sh_surface_replace_find.vsh_mod b/shaders/sh_surface_replace_find/sh_surface_replace_find.vsh_mod new file mode 100644 index 000000000..e7165abd9 --- /dev/null +++ b/shaders/sh_surface_replace_find/sh_surface_replace_find.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8932257+07:00 diff --git a/shaders/sh_surface_replace_replace/sh_surface_replace_replace.fsh_mod b/shaders/sh_surface_replace_replace/sh_surface_replace_replace.fsh_mod new file mode 100644 index 000000000..797628505 --- /dev/null +++ b/shaders/sh_surface_replace_replace/sh_surface_replace_replace.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8936508+07:00 diff --git a/shaders/sh_surface_replace_replace/sh_surface_replace_replace.vsh_mod b/shaders/sh_surface_replace_replace/sh_surface_replace_replace.vsh_mod new file mode 100644 index 000000000..f40a036ac --- /dev/null +++ b/shaders/sh_surface_replace_replace/sh_surface_replace_replace.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8938450+07:00 diff --git a/shaders/sh_svg_curve_quad/sh_svg_curve_quad.fsh_mod b/shaders/sh_svg_curve_quad/sh_svg_curve_quad.fsh_mod new file mode 100644 index 000000000..382afa64d --- /dev/null +++ b/shaders/sh_svg_curve_quad/sh_svg_curve_quad.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8942843+07:00 diff --git a/shaders/sh_svg_curve_quad/sh_svg_curve_quad.vsh_mod b/shaders/sh_svg_curve_quad/sh_svg_curve_quad.vsh_mod new file mode 100644 index 000000000..c429246b1 --- /dev/null +++ b/shaders/sh_svg_curve_quad/sh_svg_curve_quad.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8945666+07:00 diff --git a/shaders/sh_svg_fill/sh_svg_fill.fsh_mod b/shaders/sh_svg_fill/sh_svg_fill.fsh_mod new file mode 100644 index 000000000..f57c8d617 --- /dev/null +++ b/shaders/sh_svg_fill/sh_svg_fill.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8951278+07:00 diff --git a/shaders/sh_svg_fill/sh_svg_fill.vsh_mod b/shaders/sh_svg_fill/sh_svg_fill.vsh_mod new file mode 100644 index 000000000..185aa89e6 --- /dev/null +++ b/shaders/sh_svg_fill/sh_svg_fill.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8953520+07:00 diff --git a/shaders/sh_texture_atlas/sh_texture_atlas.fsh_mod b/shaders/sh_texture_atlas/sh_texture_atlas.fsh_mod new file mode 100644 index 000000000..f88be5eb2 --- /dev/null +++ b/shaders/sh_texture_atlas/sh_texture_atlas.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8959339+07:00 diff --git a/shaders/sh_texture_atlas/sh_texture_atlas.vsh_mod b/shaders/sh_texture_atlas/sh_texture_atlas.vsh_mod new file mode 100644 index 000000000..2d87e7dba --- /dev/null +++ b/shaders/sh_texture_atlas/sh_texture_atlas.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8961345+07:00 diff --git a/shaders/sh_texture_remap/sh_texture_remap.fsh b/shaders/sh_texture_remap/sh_texture_remap.fsh index 768096958..76952847d 100644 --- a/shaders/sh_texture_remap/sh_texture_remap.fsh +++ b/shaders/sh_texture_remap/sh_texture_remap.fsh @@ -1,79 +1,98 @@ -varying vec2 v_vTexcoord; -varying vec4 v_vColour; +#pragma use(sampler) -uniform sampler2D map; - -#region /////////////// SAMPLING /////////////// - const float PI = 3.14159265358979323846; - uniform int interpolation; +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; uniform vec2 sampleDimension; + uniform int sampleMode; - const int RSIN_RADIUS = 1; - + const float PI = 3.14159265358979323846; float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { uv = uv * sampleDimension + 0.5; vec2 iuv = floor( uv ); vec2 fuv = fract( uv ); uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); return texture2D( texture, uv ); } -#endregion + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform sampler2D map; void main() { vec4 map = texture2Dintp( map, v_vTexcoord ); diff --git a/shaders/sh_texture_remap/sh_texture_remap.fsh_mod b/shaders/sh_texture_remap/sh_texture_remap.fsh_mod new file mode 100644 index 000000000..86eb2ff2d --- /dev/null +++ b/shaders/sh_texture_remap/sh_texture_remap.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8966368+07:00 diff --git a/shaders/sh_texture_remap/sh_texture_remap.vsh_mod b/shaders/sh_texture_remap/sh_texture_remap.vsh_mod new file mode 100644 index 000000000..1e8ef565f --- /dev/null +++ b/shaders/sh_texture_remap/sh_texture_remap.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8968514+07:00 diff --git a/shaders/sh_texture_repeat/sh_texture_repeat.fsh_mod b/shaders/sh_texture_repeat/sh_texture_repeat.fsh_mod new file mode 100644 index 000000000..ae4f24b59 --- /dev/null +++ b/shaders/sh_texture_repeat/sh_texture_repeat.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8973951+07:00 diff --git a/shaders/sh_texture_repeat/sh_texture_repeat.vsh_mod b/shaders/sh_texture_repeat/sh_texture_repeat.vsh_mod new file mode 100644 index 000000000..85ea81361 --- /dev/null +++ b/shaders/sh_texture_repeat/sh_texture_repeat.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8975731+07:00 diff --git a/shaders/sh_threshold/sh_threshold.fsh_mod b/shaders/sh_threshold/sh_threshold.fsh_mod new file mode 100644 index 000000000..9649b6926 --- /dev/null +++ b/shaders/sh_threshold/sh_threshold.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8980071+07:00 diff --git a/shaders/sh_threshold/sh_threshold.vsh_mod b/shaders/sh_threshold/sh_threshold.vsh_mod new file mode 100644 index 000000000..eae6a74de --- /dev/null +++ b/shaders/sh_threshold/sh_threshold.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8981815+07:00 diff --git a/shaders/sh_tile_random/sh_tile_random.fsh_mod b/shaders/sh_tile_random/sh_tile_random.fsh_mod new file mode 100644 index 000000000..f0ce45fc1 --- /dev/null +++ b/shaders/sh_tile_random/sh_tile_random.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8986055+07:00 diff --git a/shaders/sh_tile_random/sh_tile_random.vsh_mod b/shaders/sh_tile_random/sh_tile_random.vsh_mod new file mode 100644 index 000000000..49397ca64 --- /dev/null +++ b/shaders/sh_tile_random/sh_tile_random.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8987912+07:00 diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh b/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh index 0255f71bd..026c9680e 100644 --- a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh +++ b/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh @@ -66,11 +66,19 @@ void main() { // 6 7 8 if(bitmaskType == 0) { - int _bitIndex = i1 * 1 + i3 * 2 + i5 * 4 + i7 * 8; - index = bitmask[_bitIndex]; + index = 4; + + if(_0(i1) && _0(i3) && _1(i5) && _1(i7)) index = 0; + if(_0(i1) && _1(i3) && _0(i5) && _1(i7)) index = 2; + if(_1(i1) && _0(i3) && _1(i5) && _0(i7)) index = 6; + if(_1(i1) && _1(i3) && _0(i5) && _0(i7)) index = 8; + + if(_0(i1) && _1(i3) && _1(i5) && _1(i7)) index = 1; + if(_1(i1) && _0(i3) && _1(i5) && _1(i7)) index = 3; + if(_1(i1) && _1(i3) && _0(i5) && _1(i7)) index = 5; + if(_1(i1) && _1(i3) && _1(i5) && _0(i7)) index = 7; } else if(bitmaskType == 1) { - int _bitIndex = i1 * 1 + i3 * 2 + i5 * 4 + i7 * 8; index = 6; if(_0(i1) && _0(i3) && _1(i5) && _1(i7)) index = 0; @@ -95,31 +103,42 @@ void main() { if(_0(i0) && _0(i8)) index = 14; } - } else if(bitmaskType == 2) { + } else if(bitmaskType == 2 || bitmaskType == 3) { index = 12; - if(_0(i0) && _0(i1) && _0(i3) && _1(i5) && _1(i7) && _1(i8)) index = 0; - if(_0(i1) && _0(i2) && _1(i3) && _0(i5) && _1(i6) && _1(i7)) index = 2; - if(_1(i1) && _1(i2) && _0(i3) && _1(i5) && _0(i7) && _0(i8)) index = 22; - if(_1(i0) && _1(i1) && _1(i3) && _0(i5) && _0(i6) && _0(i7)) index = 24; - + if(_A(i0) && _0(i1) && _A(i2) && + _0(i3) && _1(i5) && + _A(i6) && _1(i7) && _1(i8)) index = 0; + + if(_A(i0) && _0(i1) && _A(i2) && + _1(i3) && _0(i5) && + _1(i6) && _1(i7) && _A(i8)) index = 2; + + if(_A(i0) && _1(i1) && _1(i2) && + _0(i3) && _1(i5) && + _A(i6) && _0(i7) && _A(i8)) index = 22; + + if(_1(i0) && _1(i1) && _A(i2) && + _1(i3) && _0(i5) && + _A(i6) && _0(i7) && _A(i8)) index = 24; + ///////////////// - if(_0(i0) && _0(i1) && _0(i2) && + if(_A(i0) && _0(i1) && _A(i2) && _1(i3) && _1(i5) && _1(i6) && _1(i7) && _1(i8)) index = 1; - if(_0(i0) && _1(i1) && _1(i2) && + if(_A(i0) && _1(i1) && _1(i2) && _0(i3) && _1(i5) && - _0(i6) && _1(i7) && _1(i8)) index = 11; + _A(i6) && _1(i7) && _1(i8)) index = 11; - if(_1(i0) && _1(i1) && _0(i2) && + if(_1(i0) && _1(i1) && _A(i2) && _1(i3) && _0(i5) && - _1(i6) && _1(i7) && _0(i8)) index = 13; + _1(i6) && _1(i7) && _A(i8)) index = 13; if(_1(i0) && _1(i1) && _1(i2) && _1(i3) && _1(i5) && - _0(i6) && _0(i7) && _0(i8)) index = 23; + _A(i6) && _0(i7) && _A(i8)) index = 23; ///////////////// @@ -234,15 +253,15 @@ void main() { if(_1(i0) && _1(i1) && _0(i2) && _1(i3) && _1(i5) && _1(i6) && _1(i7) && _0(i8)) index = 49; - - if(_0(i0) && _1(i1) && _A(i2) && - _1(i3) && _0(i5) && - _0(i6) && _0(i7) && _A(i8)) index = 50; if(_0(i0) && _1(i1) && _1(i2) && _1(i3) && _1(i5) && - _0(i6) && _0(i7) && _1(i8)) index = 51; + _0(i6) && _1(i7) && _1(i8)) index = 50; + if(_0(i0) && _1(i1) && _A(i2) && + _1(i3) && _0(i5) && + _0(i6) && _1(i7) && _A(i8)) index = 51; + ///////////////// if(_A(i0) && _0(i1) && _A(i2) && @@ -295,6 +314,10 @@ void main() { _1(i3) && _1(i5) && _0(i6) && _1(i7) && _0(i8)) index = 52; + if(bitmaskType == 2) { + if(index == 0) index == 0; + else if(index == 0) index == 0; + } } float res = float(indexes[index]); diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh_mod b/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh_mod new file mode 100644 index 000000000..50f44e1d8 --- /dev/null +++ b/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-23T17:21:02.4396140+07:00 diff --git a/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh_mod b/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh_mod new file mode 100644 index 000000000..5944d8508 --- /dev/null +++ b/shaders/sh_tiler_autotile_apply/sh_tiler_autotile_apply.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-19T14:45:06.1886557+07:00 diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh_mod b/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh_mod new file mode 100644 index 000000000..b9977f1b1 --- /dev/null +++ b/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-19T17:24:19.7945398+07:00 diff --git a/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh_mod b/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh_mod new file mode 100644 index 000000000..2c64280f6 --- /dev/null +++ b/shaders/sh_tiler_autotile_mask/sh_tiler_autotile_mask.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-19T14:45:02.6455087+07:00 diff --git a/shaders/sh_time_remap/sh_time_remap.fsh_mod b/shaders/sh_time_remap/sh_time_remap.fsh_mod new file mode 100644 index 000000000..4ae281231 --- /dev/null +++ b/shaders/sh_time_remap/sh_time_remap.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8995335+07:00 diff --git a/shaders/sh_time_remap/sh_time_remap.vsh_mod b/shaders/sh_time_remap/sh_time_remap.vsh_mod new file mode 100644 index 000000000..4bc563ff5 --- /dev/null +++ b/shaders/sh_time_remap/sh_time_remap.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.8997394+07:00 diff --git a/shaders/sh_trail_filler/sh_trail_filler.fsh_mod b/shaders/sh_trail_filler/sh_trail_filler.fsh_mod new file mode 100644 index 000000000..f68a2c548 --- /dev/null +++ b/shaders/sh_trail_filler/sh_trail_filler.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9016519+07:00 diff --git a/shaders/sh_trail_filler/sh_trail_filler.vsh_mod b/shaders/sh_trail_filler/sh_trail_filler.vsh_mod new file mode 100644 index 000000000..f979537d6 --- /dev/null +++ b/shaders/sh_trail_filler/sh_trail_filler.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9018595+07:00 diff --git a/shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.fsh_mod b/shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.fsh_mod new file mode 100644 index 000000000..051cac3f5 --- /dev/null +++ b/shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9002244+07:00 diff --git a/shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.vsh_mod b/shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.vsh_mod new file mode 100644 index 000000000..432f79147 --- /dev/null +++ b/shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9004166+07:00 diff --git a/shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.fsh_mod b/shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.fsh_mod new file mode 100644 index 000000000..615dbf0bb --- /dev/null +++ b/shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9009181+07:00 diff --git a/shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.vsh_mod b/shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.vsh_mod new file mode 100644 index 000000000..be8bfea8a --- /dev/null +++ b/shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9011234+07:00 diff --git a/shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.fsh_mod b/shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.fsh_mod new file mode 100644 index 000000000..e9469d1f2 --- /dev/null +++ b/shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9024143+07:00 diff --git a/shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.vsh_mod b/shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.vsh_mod new file mode 100644 index 000000000..289161b4d --- /dev/null +++ b/shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9026320+07:00 diff --git a/shaders/sh_twirl/sh_twirl.fsh b/shaders/sh_twirl/sh_twirl.fsh index 82b387aff..65de58ef7 100644 --- a/shaders/sh_twirl/sh_twirl.fsh +++ b/shaders/sh_twirl/sh_twirl.fsh @@ -1,12 +1,99 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 dimension; uniform vec2 center; -uniform int sampleMode; uniform vec2 radius; uniform int radiusUseSurf; @@ -16,98 +103,6 @@ uniform vec2 strength; uniform int strengthUseSurf; uniform sampler2D strengthSurf; -#region /////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -#endregion /////////////// SAMPLING /////////////// - -vec4 sampleTexture(vec2 pos) { #region - if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) - return texture2Dintp(gm_BaseTexture, pos); - - if(sampleMode == 0) - return vec4(0.); - - else if(sampleMode == 1) - return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); - - else if(sampleMode == 2) - return texture2Dintp(gm_BaseTexture, fract(pos)); - - else if(sampleMode == 3) - return vec4(vec3(0.), 1.); - - return vec4(0.); -} #endregion - void main() { float rad = radius.x; if(radiusUseSurf == 1) { @@ -121,12 +116,12 @@ void main() { str = mix(strength.x, strength.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); } - vec2 pixelPos = v_vTexcoord * dimension; - vec2 to = pixelPos - center; - float dis = distance(center, pixelPos); - float eff = 1. - clamp(dis / rad, 0., 1.); - float ang = atan(to.y, to.x) + eff * str; + vec2 px = v_vTexcoord * dimension; + vec2 to = px - center; + float dis = distance(center, px); + float eff = 1. - clamp(dis / rad, 0., 1.); + float ang = atan(to.y, to.x) + eff * str; - vec2 tex = center + vec2(cos(ang), sin(ang)) * distance(center, pixelPos); - gl_FragColor = sampleTexture( tex / dimension ); + vec2 tex = center + vec2(cos(ang), sin(ang)) * distance(center, px); + gl_FragColor = sampleTexture( gm_BaseTexture, tex / dimension ); } diff --git a/shaders/sh_twirl/sh_twirl.fsh_bak b/shaders/sh_twirl/sh_twirl.fsh_bak new file mode 100644 index 000000000..11e774f14 --- /dev/null +++ b/shaders/sh_twirl/sh_twirl.fsh_bak @@ -0,0 +1,131 @@ +#pragma shady: import(sh_sample) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform vec2 center; +uniform int sampleMode; + +uniform vec2 radius; +uniform int radiusUseSurf; +uniform sampler2D radiusSurf; + +uniform vec2 strength; +uniform int strengthUseSurf; +uniform sampler2D strengthSurf; + +// #region /////////////// SAMPLING /////////////// + +// const float PI = 3.14159265358979323846; +// uniform int interpolation; +// uniform vec2 sampleDimension; + +// const int RSIN_RADIUS = 1; + +// float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + +// vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { +// uv = uv * sampleDimension - .5; +// vec2 iuv = floor( uv ); +// vec2 fuv = fract( uv ); + +// vec4 mixed = mix( +// mix( +// texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), +// texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), +// fuv.x +// ), +// mix( +// texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), +// texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), +// fuv.x +// ), +// fuv.y +// ); + +// mixed.rgb /= mixed.a; + +// return mixed; +// } + +// vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { +// vec2 tx = 1.0 / sampleDimension; +// vec2 p = uv * sampleDimension - vec2(0.5); + +// vec4 sum = vec4(0.0); +// float weights = 0.; + +// for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) +// for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { +// float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); +// if(a > 1.) continue; +// float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); +// vec2 offset = vec2(float(x), float(y)) * tx; +// vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); +// sum += w * sample; +// weights += w; +// } + +// return sum / weights; +// } + +// vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { +// uv = uv * sampleDimension + 0.5; +// vec2 iuv = floor( uv ); +// vec2 fuv = fract( uv ); +// uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); +// uv = (uv - 0.5) / sampleDimension; +// return texture2D_bilinear( texture, uv ); +// } + +// vec4 texture2Dintp( sampler2D texture, vec2 uv ) { +// if(interpolation == 1) return texture2D_bilinear( texture, uv ); +// else if(interpolation == 2) return texture2D_bicubic( texture, uv ); +// else if(interpolation == 3) return texture2D_rsin( texture, uv ); +// return texture2D( texture, uv ); +// } + +// #endregion /////////////// SAMPLING /////////////// + +vec4 sampleTexture(vec2 pos) { #region + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(gm_BaseTexture, pos); + + if(sampleMode == 0) + return vec4(0.); + + else if(sampleMode == 1) + return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); + + else if(sampleMode == 2) + return texture2Dintp(gm_BaseTexture, fract(pos)); + + else if(sampleMode == 3) + return vec4(vec3(0.), 1.); + + return vec4(0.); +} #endregion + +void main() { + float rad = radius.x; + if(radiusUseSurf == 1) { + vec4 _vMap = texture2Dintp( radiusSurf, v_vTexcoord ); + rad = mix(radius.x, radius.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); + } + + float str = strength.x; + if(strengthUseSurf == 1) { + vec4 _vMap = texture2Dintp( strengthSurf, v_vTexcoord ); + str = mix(strength.x, strength.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); + } + + vec2 pixelPos = v_vTexcoord * dimension; + vec2 to = pixelPos - center; + float dis = distance(center, pixelPos); + float eff = 1. - clamp(dis / rad, 0., 1.); + float ang = atan(to.y, to.x) + eff * str; + + vec2 tex = center + vec2(cos(ang), sin(ang)) * distance(center, pixelPos); + gl_FragColor = sampleTexture( tex / dimension ); +} diff --git a/shaders/sh_twirl/sh_twirl.fsh_mod b/shaders/sh_twirl/sh_twirl.fsh_mod new file mode 100644 index 000000000..911133f7b --- /dev/null +++ b/shaders/sh_twirl/sh_twirl.fsh_mod @@ -0,0 +1,197 @@ +// Date: 2024-10-24T08:46:47.5894476+07:00 +// begin import sh_sample.fsh.__shady_export +#region /////////////// SAMPLING /////////////// + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + vec4 col = vec4(0.); + float wei = 0.; + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + col += w * sample; + wei += w; + } + col /= wei; + return col; + } + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + vec4 col = vec4(0.); + float wei = 0.; + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + col /= wei; + return col; + } + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + return texture2D( texture, uv ); + } + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + if(sampleMode == 0) return vec4(0.); + else if(sampleMode == 1) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 2) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 3) return vec4(vec3(0.), 1.); + return vec4(0.); + } +#endregion /////////////// SAMPLING /////////////// +// end import sh_sample.fsh.__shady_export + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform vec2 center; +uniform int sampleMode; + +uniform vec2 radius; +uniform int radiusUseSurf; +uniform sampler2D radiusSurf; + +uniform vec2 strength; +uniform int strengthUseSurf; +uniform sampler2D strengthSurf; + +// #region /////////////// SAMPLING /////////////// + +// const float PI = 3.14159265358979323846; +// uniform int interpolation; +// uniform vec2 sampleDimension; + +// const int RSIN_RADIUS = 1; + +// float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + +// vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { +// uv = uv * sampleDimension - .5; +// vec2 iuv = floor( uv ); +// vec2 fuv = fract( uv ); + +// vec4 mixed = mix( +// mix( +// texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), +// texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), +// fuv.x +// ), +// mix( +// texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), +// texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), +// fuv.x +// ), +// fuv.y +// ); + +// mixed.rgb /= mixed.a; + +// return mixed; +// } + +// vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { +// vec2 tx = 1.0 / sampleDimension; +// vec2 p = uv * sampleDimension - vec2(0.5); + +// vec4 sum = vec4(0.0); +// float weights = 0.; + +// for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) +// for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { +// float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); +// if(a > 1.) continue; +// float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); +// vec2 offset = vec2(float(x), float(y)) * tx; +// vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); +// sum += w * sample; +// weights += w; +// } + +// return sum / weights; +// } + +// vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { +// uv = uv * sampleDimension + 0.5; +// vec2 iuv = floor( uv ); +// vec2 fuv = fract( uv ); +// uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); +// uv = (uv - 0.5) / sampleDimension; +// return texture2D_bilinear( texture, uv ); +// } + +// vec4 texture2Dintp( sampler2D texture, vec2 uv ) { +// if(interpolation == 1) return texture2D_bilinear( texture, uv ); +// else if(interpolation == 2) return texture2D_bicubic( texture, uv ); +// else if(interpolation == 3) return texture2D_rsin( texture, uv ); +// return texture2D( texture, uv ); +// } + +// #endregion /////////////// SAMPLING /////////////// + +vec4 sampleTexture(vec2 pos) { #region + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(gm_BaseTexture, pos); + + if(sampleMode == 0) + return vec4(0.); + + else if(sampleMode == 1) + return texture2Dintp(gm_BaseTexture, clamp(pos, 0., 1.)); + + else if(sampleMode == 2) + return texture2Dintp(gm_BaseTexture, fract(pos)); + + else if(sampleMode == 3) + return vec4(vec3(0.), 1.); + + return vec4(0.); +} #endregion + +void main() { + float rad = radius.x; + if(radiusUseSurf == 1) { + vec4 _vMap = texture2Dintp( radiusSurf, v_vTexcoord ); + rad = mix(radius.x, radius.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); + } + + float str = strength.x; + if(strengthUseSurf == 1) { + vec4 _vMap = texture2Dintp( strengthSurf, v_vTexcoord ); + str = mix(strength.x, strength.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); + } + + vec2 pixelPos = v_vTexcoord * dimension; + vec2 to = pixelPos - center; + float dis = distance(center, pixelPos); + float eff = 1. - clamp(dis / rad, 0., 1.); + float ang = atan(to.y, to.x) + eff * str; + + vec2 tex = center + vec2(cos(ang), sin(ang)) * distance(center, pixelPos); + gl_FragColor = sampleTexture( tex / dimension ); +} diff --git a/shaders/sh_twirl/sh_twirl.vsh_mod b/shaders/sh_twirl/sh_twirl.vsh_mod new file mode 100644 index 000000000..b52831317 --- /dev/null +++ b/shaders/sh_twirl/sh_twirl.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-24T09:03:43.0655542+07:00 diff --git a/shaders/sh_ui_rotator/sh_ui_rotator.fsh_mod b/shaders/sh_ui_rotator/sh_ui_rotator.fsh_mod new file mode 100644 index 000000000..cba1eca95 --- /dev/null +++ b/shaders/sh_ui_rotator/sh_ui_rotator.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9039642+07:00 diff --git a/shaders/sh_ui_rotator/sh_ui_rotator.vsh_mod b/shaders/sh_ui_rotator/sh_ui_rotator.vsh_mod new file mode 100644 index 000000000..0261d5f5f --- /dev/null +++ b/shaders/sh_ui_rotator/sh_ui_rotator.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9041726+07:00 diff --git a/shaders/sh_ui_shape_circle/sh_ui_shape_circle.fsh_mod b/shaders/sh_ui_shape_circle/sh_ui_shape_circle.fsh_mod new file mode 100644 index 000000000..46445ac61 --- /dev/null +++ b/shaders/sh_ui_shape_circle/sh_ui_shape_circle.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9046950+07:00 diff --git a/shaders/sh_ui_shape_circle/sh_ui_shape_circle.vsh_mod b/shaders/sh_ui_shape_circle/sh_ui_shape_circle.vsh_mod new file mode 100644 index 000000000..6d3dd59b0 --- /dev/null +++ b/shaders/sh_ui_shape_circle/sh_ui_shape_circle.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9048824+07:00 diff --git a/shaders/sh_ui_slider/sh_ui_slider.fsh_mod b/shaders/sh_ui_slider/sh_ui_slider.fsh_mod new file mode 100644 index 000000000..97234d40f --- /dev/null +++ b/shaders/sh_ui_slider/sh_ui_slider.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9053271+07:00 diff --git a/shaders/sh_ui_slider/sh_ui_slider.vsh_mod b/shaders/sh_ui_slider/sh_ui_slider.vsh_mod new file mode 100644 index 000000000..132dce974 --- /dev/null +++ b/shaders/sh_ui_slider/sh_ui_slider.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9055118+07:00 diff --git a/shaders/sh_vector_diverge/sh_vector_diverge.fsh_mod b/shaders/sh_vector_diverge/sh_vector_diverge.fsh_mod new file mode 100644 index 000000000..c233c2bde --- /dev/null +++ b/shaders/sh_vector_diverge/sh_vector_diverge.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9059320+07:00 diff --git a/shaders/sh_vector_diverge/sh_vector_diverge.vsh_mod b/shaders/sh_vector_diverge/sh_vector_diverge.vsh_mod new file mode 100644 index 000000000..1bbacb221 --- /dev/null +++ b/shaders/sh_vector_diverge/sh_vector_diverge.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9061235+07:00 diff --git a/shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.fsh_mod b/shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.fsh_mod new file mode 100644 index 000000000..6c892cce2 --- /dev/null +++ b/shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9065479+07:00 diff --git a/shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.vsh_mod b/shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.vsh_mod new file mode 100644 index 000000000..b45408430 --- /dev/null +++ b/shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9067283+07:00 diff --git a/shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.fsh_mod b/shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.fsh_mod new file mode 100644 index 000000000..b2387051c --- /dev/null +++ b/shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9071508+07:00 diff --git a/shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.vsh_mod b/shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.vsh_mod new file mode 100644 index 000000000..1b65afe47 --- /dev/null +++ b/shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9073310+07:00 diff --git a/shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.fsh_mod b/shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.fsh_mod new file mode 100644 index 000000000..82af83258 --- /dev/null +++ b/shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9077397+07:00 diff --git a/shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.vsh_mod b/shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.vsh_mod new file mode 100644 index 000000000..78ed84c0f --- /dev/null +++ b/shaders/sh_vertex_pnt_light/sh_vertex_pnt_light.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9079128+07:00 diff --git a/shaders/sh_vertex_pt/sh_vertex_pt.fsh_mod b/shaders/sh_vertex_pt/sh_vertex_pt.fsh_mod new file mode 100644 index 000000000..f59c39064 --- /dev/null +++ b/shaders/sh_vertex_pt/sh_vertex_pt.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9083744+07:00 diff --git a/shaders/sh_vertex_pt/sh_vertex_pt.vsh_mod b/shaders/sh_vertex_pt/sh_vertex_pt.vsh_mod new file mode 100644 index 000000000..216c62174 --- /dev/null +++ b/shaders/sh_vertex_pt/sh_vertex_pt.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9085563+07:00 diff --git a/shaders/sh_vignette/sh_vignette.fsh_mod b/shaders/sh_vignette/sh_vignette.fsh_mod new file mode 100644 index 000000000..ca8b85fb0 --- /dev/null +++ b/shaders/sh_vignette/sh_vignette.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9089732+07:00 diff --git a/shaders/sh_vignette/sh_vignette.vsh_mod b/shaders/sh_vignette/sh_vignette.vsh_mod new file mode 100644 index 000000000..40fa5dc5f --- /dev/null +++ b/shaders/sh_vignette/sh_vignette.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9091721+07:00 diff --git a/shaders/sh_voronoi_extra/sh_voronoi_extra.fsh_mod b/shaders/sh_voronoi_extra/sh_voronoi_extra.fsh_mod new file mode 100644 index 000000000..0c068a799 --- /dev/null +++ b/shaders/sh_voronoi_extra/sh_voronoi_extra.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9096059+07:00 diff --git a/shaders/sh_voronoi_extra/sh_voronoi_extra.vsh_mod b/shaders/sh_voronoi_extra/sh_voronoi_extra.vsh_mod new file mode 100644 index 000000000..71abb0fd6 --- /dev/null +++ b/shaders/sh_voronoi_extra/sh_voronoi_extra.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9097912+07:00 diff --git a/shaders/sh_warp_4points/sh_warp_4points.fsh b/shaders/sh_warp_4points/sh_warp_4points.fsh index 820b51ee3..1aafad4c6 100644 --- a/shaders/sh_warp_4points/sh_warp_4points.fsh +++ b/shaders/sh_warp_4points/sh_warp_4points.fsh @@ -1,3 +1,94 @@ +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -8,79 +99,6 @@ uniform vec2 p3; uniform vec2 dimension; uniform int tile; -#region /////////////// SAMPLING /////////////// - - const float PI = 3.14159265358979323846; - uniform int interpolation; - uniform vec2 sampleDimension; - - const int RSIN_RADIUS = 1; - - float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - - vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; - } - - vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; - } - - vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); - } - - vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); - } - -#endregion /////////////// SAMPLING /////////////// - float unmix( float st, float ed, float val) { return (val - st) / (ed - st); } // 2 1 diff --git a/shaders/sh_warp_4points/sh_warp_4points.fsh_mod b/shaders/sh_warp_4points/sh_warp_4points.fsh_mod new file mode 100644 index 000000000..e5d5ea0bd --- /dev/null +++ b/shaders/sh_warp_4points/sh_warp_4points.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9108462+07:00 diff --git a/shaders/sh_warp_4points/sh_warp_4points.vsh_mod b/shaders/sh_warp_4points/sh_warp_4points.vsh_mod new file mode 100644 index 000000000..4df0acffc --- /dev/null +++ b/shaders/sh_warp_4points/sh_warp_4points.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9110386+07:00 diff --git a/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh index 50cebad29..255d49ca2 100644 --- a/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh +++ b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh @@ -1,6 +1,94 @@ -// -// Simple passthrough fragment shader -// +#pragma use(sampler) + +#region -- sampler -- [1729740697.9444373] + uniform int interpolation; + uniform vec2 sampleDimension; + uniform int sampleMode; + + const float PI = 3.14159265358979323846; + float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } + + vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { + uv = uv * sampleDimension + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); + uv = (uv - 0.5) / sampleDimension; + return texture2D( texture, uv ); + } + + const int RSIN_RADIUS = 1; + vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { + vec2 tx = 1.0 / sampleDimension; + vec2 p = uv * sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) + for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { + vec2 sx = vec2(float(x), float(y)); + float a = length(sx) / float(RSIN_RADIUS); + // if(a > 1.) continue; + + vec4 sample = texture2D(texture, uv + sx * tx); + float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); + + col += w * sample; + wei += w; + } + + col /= wei; + return col; + } + + const int LANCZOS_RADIUS = 3; + float lanczosWeight(float d, float n) { return d == 0.0 ? 1.0 : (d * d < n * n ? sinc(d) * sinc(d / n) : 0.0); } + + vec4 texture2D_lanczos3( sampler2D texture, vec2 uv ) { + vec2 center = uv - (mod(uv * sampleDimension, 1.0) - 0.5) / sampleDimension; + vec2 offset = (uv - center) * sampleDimension; + vec2 tx = 1. / sampleDimension; + + vec4 col = vec4(0.); + float wei = 0.; + + for(int x = -LANCZOS_RADIUS; x < LANCZOS_RADIUS; x++) + for(int y = -LANCZOS_RADIUS; y < LANCZOS_RADIUS; y++) { + + float wx = lanczosWeight(float(x) - offset.x, float(LANCZOS_RADIUS)); + float wy = lanczosWeight(float(y) - offset.y, float(LANCZOS_RADIUS)); + float w = wx * wy; + + col += w * texture2D(texture, center + vec2(x, y) * tx); + wei += w; + } + + col /= wei; + return col; + } + + vec4 texture2Dintp( sampler2D texture, vec2 uv ) { + if(interpolation <= 1) return texture2D( texture, uv ); + else if(interpolation == 2) return texture2D_bicubic( texture, uv ); + else if(interpolation == 3) return texture2D_lanczos3( texture, uv ); + + return texture2D( texture, uv ); + } + + vec4 sampleTexture( sampler2D texture, vec2 pos) { + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2Dintp(texture, pos); + + if(sampleMode <= 1) return vec4(0.); + else if(sampleMode == 2) return texture2Dintp(texture, clamp(pos, 0., 1.)); + else if(sampleMode == 3) return texture2Dintp(texture, fract(pos)); + else if(sampleMode == 4) return vec4(vec3(0.), 1.); + + return vec4(0.); + } +#endregion -- sampler -- + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -9,79 +97,6 @@ uniform vec2 t2; uniform vec2 t3; uniform vec2 t4; -/////////////// SAMPLING /////////////// - -const float PI = 3.14159265358979323846; -uniform int interpolation; -uniform vec2 sampleDimension; - -const int RSIN_RADIUS = 1; - -float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); } - -vec4 texture2D_bilinear( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension - .5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - - vec4 mixed = mix( - mix( - texture2D( texture, (iuv + vec2(0., 0.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 0.)) / sampleDimension ), - fuv.x - ), - mix( - texture2D( texture, (iuv + vec2(0., 1.)) / sampleDimension ), - texture2D( texture, (iuv + vec2(1., 1.)) / sampleDimension ), - fuv.x - ), - fuv.y - ); - - mixed.rgb /= mixed.a; - - return mixed; -} - -vec4 texture2D_rsin( sampler2D texture, vec2 uv ) { - vec2 tx = 1.0 / sampleDimension; - vec2 p = uv * sampleDimension - vec2(0.5); - - vec4 sum = vec4(0.0); - float weights = 0.; - - for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++) - for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) { - float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS); - if(a > 1.) continue; - float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y); - vec2 offset = vec2(float(x), float(y)) * tx; - vec4 sample = texture2D_bilinear(texture, (p + offset + vec2(0.5)) / sampleDimension); - sum += w * sample; - weights += w; - } - - return sum / weights; -} - -vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) { - uv = uv * sampleDimension + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv); - uv = (uv - 0.5) / sampleDimension; - return texture2D_bilinear( texture, uv ); -} - -vec4 texture2Dintp( sampler2D texture, vec2 uv ) { - if(interpolation == 1) return texture2D_bilinear( texture, uv ); - else if(interpolation == 2) return texture2D_bicubic( texture, uv ); - else if(interpolation == 3) return texture2D_rsin( texture, uv ); - return texture2D( texture, uv ); -} - -/////////////// SAMPLING /////////////// - mat3 m_inverse(mat3 m) { float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2]; diff --git a/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh_mod b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh_mod new file mode 100644 index 000000000..3a388cf07 --- /dev/null +++ b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9102508+07:00 diff --git a/shaders/sh_warp_4points_pers/sh_warp_4points_pers.vsh_mod b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.vsh_mod new file mode 100644 index 000000000..8344d913d --- /dev/null +++ b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9104163+07:00 diff --git a/shaders/sh_water_caustic/sh_water_caustic.fsh_mod b/shaders/sh_water_caustic/sh_water_caustic.fsh_mod new file mode 100644 index 000000000..d34bdcfb5 --- /dev/null +++ b/shaders/sh_water_caustic/sh_water_caustic.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9115662+07:00 diff --git a/shaders/sh_water_caustic/sh_water_caustic.vsh_mod b/shaders/sh_water_caustic/sh_water_caustic.vsh_mod new file mode 100644 index 000000000..523bfb9e3 --- /dev/null +++ b/shaders/sh_water_caustic/sh_water_caustic.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9117538+07:00 diff --git a/shaders/sh_widget_rotator/sh_widget_rotator.fsh_mod b/shaders/sh_widget_rotator/sh_widget_rotator.fsh_mod new file mode 100644 index 000000000..c9a949681 --- /dev/null +++ b/shaders/sh_widget_rotator/sh_widget_rotator.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9128199+07:00 diff --git a/shaders/sh_widget_rotator/sh_widget_rotator.vsh_mod b/shaders/sh_widget_rotator/sh_widget_rotator.vsh_mod new file mode 100644 index 000000000..8beb77538 --- /dev/null +++ b/shaders/sh_widget_rotator/sh_widget_rotator.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9129795+07:00 diff --git a/shaders/sh_widget_rotator_range/sh_widget_rotator_range.fsh_mod b/shaders/sh_widget_rotator_range/sh_widget_rotator_range.fsh_mod new file mode 100644 index 000000000..e6d7a37db --- /dev/null +++ b/shaders/sh_widget_rotator_range/sh_widget_rotator_range.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9121597+07:00 diff --git a/shaders/sh_widget_rotator_range/sh_widget_rotator_range.vsh_mod b/shaders/sh_widget_rotator_range/sh_widget_rotator_range.vsh_mod new file mode 100644 index 000000000..6478b9c89 --- /dev/null +++ b/shaders/sh_widget_rotator_range/sh_widget_rotator_range.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9123537+07:00 diff --git a/shaders/sh_zigzag/sh_zigzag.fsh_mod b/shaders/sh_zigzag/sh_zigzag.fsh_mod new file mode 100644 index 000000000..85d3c8035 --- /dev/null +++ b/shaders/sh_zigzag/sh_zigzag.fsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9136180+07:00 diff --git a/shaders/sh_zigzag/sh_zigzag.vsh_mod b/shaders/sh_zigzag/sh_zigzag.vsh_mod new file mode 100644 index 000000000..11a408cf7 --- /dev/null +++ b/shaders/sh_zigzag/sh_zigzag.vsh_mod @@ -0,0 +1 @@ +// Date: 2024-10-15T09:38:04.9138227+07:00