Commit Graph

201 Commits

Author SHA1 Message Date
Jeffery Myers 728ccc96bc
Use the vertex color as part of the base shader in GLSL330 (#4431) 2024-10-24 23:49:30 +02:00
IcyLeave6109 15f6c47f07
Use free camera in model shader example (#4428) 2024-10-24 17:49:47 +02:00
Anthony Carbajal 06aeb21429
update shaders basic pbr (#4225) 2024-08-09 09:15:07 +02:00
Anthony Carbajal 070c1c9d63
update examples missing unloadtexture (#4234) 2024-08-09 09:03:27 +02:00
Ray db8b199363 Reviewed shader 2024-08-06 18:32:14 +02:00
CDM15y b44b759b8f
[examples][shaders_raymarching] Add `raymarching.fs` for GLSL120 (#4183)
* Create raymarching.fs

* Update raymarching.fs

* Update raymarching.fs

* Update raymarching.fs

Remove `fragColor` as it is unused

Move the license to the top of the code to improve readability.
2024-08-06 18:30:15 +02:00
Ray b657001e0d REVIEWED: shaders_vertex_displacement 2024-08-04 22:06:20 +02:00
Alex ZH 43b0c9410e
[examples] Add new example: `shaders_vertex_displacement` (#4186)
* shaders-vertex_displacement init

* implement simulation of wave in ocean

* update examples/README & add some comments

* update comments

* add gl100 shaders
2024-08-04 21:58:26 +02:00
CDM15y 2d94d8d06d
[examples] Fix PBR and Shadowmap example shaders for GLSL 1.20 (#4167)
* Update pbr.fs

remove presicion mediump float because it is for GLES, and not desktop GL

* Fix shadowmap.fs

also suffers the same problem as pbr.fs
2024-07-20 10:42:55 +02:00
Jeffery Myers e96bab7ce6
[Build] Fix warnings when building in VS 2022 (#4095)
* Update raylib_api.* by CI

* Fix warnings when building examples in MSVC 2022

* fix auto-format that sneaked in there.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-24 17:47:32 +02:00
Karl Zylinski fffae1a975
Fix fragPosition using wrong matrix in lighting_instancing.vs (#4056)
fragPosition was multiplied by mvp*instanceTransform, but it should only be multiplied by instanceTransform. Compare to lighting.vs, there we only use mvp for gl_Position, but matModel for the fragPosition.
2024-06-11 20:55:13 +02:00
Ray 479bd84400 Update shaders_palette_switch.c 2024-05-15 16:19:53 +02:00
Ray 34d00d5217 Minor formatting tweaks 2024-05-05 19:46:31 +02:00
bohonghuang d80febde7d
[rlgl] Implement vertex normals for RLGL immediate drawing mode (#3866)
* Fix several non-functional `target_compile_definitions`

* Avoid hardcoding the default vertex attribute locations

* Implement functional `rlNormal3f`

* Add normal definitions for `DrawCube`

* Update the basic lighting example to use `DrawCube` and `DrawPlane`
2024-04-23 14:22:29 +02:00
Yousif a4819f99cb
Update shaders_hybrid_render.c (#3908)
Fix typo
2024-04-10 10:36:03 +02:00
Ray 615ee9d177 REVIEWED: `rlLoadFramebuffer()` 2024-02-04 12:13:56 +01:00
Ray 3f1e59a7cf Update copyright to 2024 2024-01-02 20:58:12 +01:00
Ray 36df9c5bd6 Update shaders_basic_pbr.c 2023-12-23 18:16:06 +01:00
Ray e039a221a3 Review formating 2023-12-23 14:07:45 +01:00
Ray 706f74bce0 Update shaders_basic_pbr.c 2023-12-23 13:32:47 +01:00
Ray bb18018f29 REVIEWED: `shaders_basic_pbr`, added more comments 2023-12-21 21:32:53 +01:00
Ray 4805dddc18 Update shaders_deferred_render.c 2023-12-21 21:32:00 +01:00
Ray 2fe68a8a12 REVIEWED PR deferred render 2023-12-20 00:51:51 +01:00
Jett e71153258b
fix for deferred rendering example. (#3655)
* fix for deferred rendering example.

* missed defines to build.
2023-12-20 00:27:59 +01:00
TheManTheMythTheGameDev 1fc3d9aeb2
Add shadowmapping example (#3653) 2023-12-19 10:37:41 +01:00
TheManTheMythTheGameDev 34a9163c52
Remove dependencies from PBR example (#3649)
* Remove dependencies from PBR example

* Reviewed example PR

---------

Co-authored-by: Ray <raysan5@gmail.com>
2023-12-19 10:36:03 +01:00
devdad 9bdc217987
basic PBR example (#3621)
* basic pbr example

pbr implementation  includes rpbr.h and few shader files header only file, which self contain everything needed for pbr rendering. Few textures and one model of the car which is under free licence which is included inside basic_pbr.c example file  currently supported shader versions are 120 and 330 , version 100 has small issue which I have to resolve

* Unloading PBRMAterial

I forgot unloading PBRMaterial

* fix small issue with texOffset assigment.

value was Vector4 at first but I found out it would be unclear for and users, so I change to have two Vector2 instead, but forgot to assign offset .

* Changed size of textures and file name changed

Changed size of textures from 2048x2048 to 1024x1024 and file name changed to shaders_basic_pbr.c ,
Added the function PBRModel PBRModelLoadFromMesh(Mesh mesh);
but GenMeshPlane(2, 2.0, 3, 3) culdn't be used because it crash once GenMeshTangents() is used with that plane mesh
2023-12-15 17:13:44 +01:00
Jussi Viitala 25c6c12150
Added glsl 100 and 120 shaders to lightmap example. (#3543)
* Added glsl 100 and 120 shaders to lightmap example.

* Fixed lightmap example resource loading on web.
2023-11-18 20:02:33 +01:00
Ray 9c2308bdc3 Examples reviews 2023-11-08 23:28:31 +01:00
Ray 022b464b0b Remove BOM 2023-11-08 20:37:35 +01:00
Ray 21354119cc REVIEWED: `Makefile.Web`, reorganize and add examples 2023-11-08 18:10:29 +01:00
Ray bbf0c3a46d REVIEWED: Added new examples to VS2022 solution 2023-11-08 17:41:08 +01:00
Jeffery Myers 6cd37e57a6
Fix warnings in visual studio (#3512) 2023-11-06 20:31:07 +01:00
Ray 64d64cc181 REVIEWED: Potential code issues reported by CodeQL #3476 2023-11-01 15:28:18 +01:00
Jeffery Myers 38205d67da
Remove unused structures from lighting fragment shaders (#3497) 2023-11-01 12:16:14 +01:00
Ray df0f7ba61e Update shaders_deferred_render.c 2023-10-31 20:59:08 +01:00
Ray aca854ccbf Update shaders_deferred_render.c 2023-10-31 20:46:10 +01:00
Justin 3645244f9f
examples/shaders: Add an example for deferred shading (#3496)
* add example for deferred rendering/shading

* adapt convention

---------

Co-authored-by: 27justin <me@justin.cx>
2023-10-31 20:13:12 +01:00
Josh Colclough 975d4154e6
Fix the Julia set shader example (#3467)
* Simplify POI selection

* Improve mouse logic

* Add colour cycles to the shader to show finer details. Works well with high iteration numbers

* Testing things...

* Actually fix zoom. Also allow user to reset camera with 'R'

* Reset max iterations

* Tidying & comments

* Revert to original if statement

* Make mouse logic more readable

* Style conventions

* Coding conventions - f postifx on floating points

* Missed a few f postfixes
2023-10-29 16:41:02 +01:00
Luís Almeida bc15c19518
Texture Tiling Example - luis605 (#3353)
* Texture Tiling Example - luis605

* Removed SetTraceLogLevel(LOG_WARNING);
2023-10-01 23:01:59 +02:00
MichaelFiber 18e9784c6d
Remove PLATFORM_RPI (#3232)
* Remove PLATFORM_RPI

* remove build artifacts

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Ray <raysan5@gmail.com>
2023-09-07 17:42:28 +02:00
Asdqwe 3d0d54e070
Fix examples/shaders/shaders_texture_outline.c help instructions (#3278) 2023-08-30 22:42:01 +02:00
Ethan Conneely fc0d132566
Remove e from secondes (#3270) 2023-08-28 22:49:45 +02:00
Ray 5573f0f1c7 REVIEWED: Ligthmap example 2023-05-04 20:35:20 +02:00
Jussi Viitala abcbd9817e
Lightmap example. (#3043) 2023-05-04 20:21:35 +02:00
Ray 54ccb18e87 Update write_depth.fs 2023-03-14 13:39:33 +01:00
Jeffery Myers 9eaed07b77
Make the oribital camera work like it used to (it is not just a copy of third person) (#2926) 2023-02-15 17:17:00 +01:00
Ray 1cfb484100 ADDED: Example project to VS 2023-02-14 20:31:42 +01:00
Ray 547819766f ADDED: Example project to VS2022 solution 2023-02-14 20:12:53 +01:00
Ray ea590c44a9 REVIEWED: Camera redesign PR 2023-02-14 20:00:51 +01:00