{"id":477,"date":"2025-05-18T20:38:31","date_gmt":"2025-05-18T20:38:31","guid":{"rendered":"https:\/\/xidriel.me\/?p=477"},"modified":"2026-02-14T09:03:51","modified_gmt":"2026-02-14T09:03:51","slug":"doperp","status":"publish","type":"post","link":"https:\/\/xidriel.me\/ru\/projects\/doperp\/","title":{"rendered":"DopeRP"},"content":{"rendered":"<div class=\"wp-block-group alignwide has-global-padding is-layout-constrained wp-container-core-group-is-layout-8a400663 wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"459\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/05\/Header2.gif\" alt=\"\" class=\"wp-image-479\"\/><\/figure>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<h1 class=\"wp-block-heading\">LINKS<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-accent-6-color has-alpha-channel-opacity has-accent-6-background-color has-background\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\"\/>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>Github repo: <a href=\"https:\/\/github.com\/xidr\/DopeRP\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/xidr\/DopeRP<\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-custom-main-blue-color has-alpha-channel-opacity has-custom-main-blue-background-color has-background is-style-default\" style=\"margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)\"\/>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<h1 class=\"wp-block-heading\">ABOUT THE PROJECT<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-accent-6-color has-alpha-channel-opacity has-accent-6-background-color has-background\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\"\/>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">This repository is a project I made while doing a task from a graphical programing contest held by CarX Tech. in 2023, november. The original repository. I didn't know a think about computer graphics, so the initial architecture was based on legendary Jasper Flick tutorials. I heavily modified the code, changed the whole render to deferred one etc., but my love is set in stone.<br>Also, Freya Holmer is a great teacher<br><br>The repo includes:<br>- Custom SRP made from scratch (DopeRP)<br>- Destruction system for both car and world objects (made using Morpeh ECS framework) (SOFT-BODY DAMAGE WAS NOT IMPLEMENTED NEITHER WITH PHYSICAL MEANS NOR WITH BONES)<br>- Two control modes (heavily relied on Cinemachine, uses Input System unity package)<br>- A scene I build to demonstrate all the stuff above (buildings are from asset store, car was shipped with the original repo, all the other stuff was made by me and my friend using Blender and Houdini)<br><\/pre>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-custom-main-blue-color has-alpha-channel-opacity has-custom-main-blue-background-color has-background is-style-default\" style=\"margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)\"\/>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<h1 class=\"wp-block-heading\">Stuff I Implemented<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-accent-6-color has-alpha-channel-opacity has-accent-6-background-color has-background\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\"\/>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Graphics (SRP + shaders)<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-accent-6-color has-alpha-channel-opacity has-accent-6-background-color has-background\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">Deferred Rendering<\/h3>\n\n\n\n<p>Implemented G_Buffer from scratch by myself. The final image is assembled in lit_deferred shader (using fullscreen quad):<\/p>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/Deferred3.gif\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">SSAO<\/h3>\n\n\n\n<p>A classical algorithm from <a href=\"https:\/\/learnopengl.com\/Advanced-Lighting\/SSAO\" data-type=\"link\" data-id=\"https:\/\/learnopengl.com\/Advanced-Lighting\/SSAO\">LearnOpenGL<\/a><br>modified a bit with info from <a href=\"https:\/\/lettier.github.io\/3d-game-shaders-for-beginners\/ssao.html\" data-type=\"link\" data-id=\"https:\/\/lettier.github.io\/3d-game-shaders-for-beginners\/ssao.html\">3d-game-shaders-for-beginners<\/a>:<\/p>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/SSAO.gif\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">PBR Materials<\/h3>\n\n\n\n<p>Standard model from <a href=\"https:\/\/google.github.io\/filament\/Filament.md.html\">Filament open-source game engine<\/a>:<\/p>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/pbr.png\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">Screen Space Decals<\/h3>\n\n\n\n<p>Base idea from <a href=\"https:\/\/martindevans.me\/game-development\/2015\/02\/27\/Drawing-Stuff-On-Other-Stuff-With-Deferred-Screenspace-Decals\/\" data-type=\"link\" data-id=\"https:\/\/martindevans.me\/game-development\/2015\/02\/27\/Drawing-Stuff-On-Other-Stuff-With-Deferred-Screenspace-Decals\/\">Drawing Stuff On Other Stuff With Deferred Screenspace Decals<\/a><br>that was heavily modified on the go (like, I added my way of calculating normals from textures, physical params for pbr, alpha-clipping etc.)<\/p>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/Decals1_1.gif\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n\n\n\n<p>Also, I used decals as part of my damage system:<\/p>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/Decals21.gif\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">PostFX<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">PostFX was taken from <a href=\"https:\/\/catlikecoding.com\/unity\/tutorials\/custom-srp\/post-processing\/\" data-type=\"link\" data-id=\"https:\/\/catlikecoding.com\/unity\/tutorials\/custom-srp\/post-processing\/\">catlikecoding tutorials<\/a>. I improved the system so I now can easily add new features to the stuck, like, on the go<br>just via SO.<br>Speaking of implemented features, the repo has three of them:<br>1. Color Grading \u2013 the variant from catlikecoding, not modified, just added<br>2. FXAA \u2013 <a href=\"https:\/\/github.com\/mattdesl\/glsl-fxaa\">glsl-fxaa, mattdesl<\/a><br>3. Vignette \u2013 from Acelola Shorts :)<\/pre>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/PostFX.gif\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">Stencil Buffer<\/h3>\n\n\n\n<p>I wanted to have especially something interesting in this project so I played a bit with stencil buffer:<\/p>\n\n\n\n<div align=\"center\">\n    <table>\n      <tr>\n        <td colspan=\"2\" align=\"center\">\n          <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/SB1.gif\" alt=\"Main GIF\" width=\"600\">\n        <\/td>\n      <\/tr>\n      <tr>\n        <td align=\"center\">\n          <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/SB2_2.gif\" alt=\"Side GIF 1\" width=\"300\">\n        <\/td>\n        <td align=\"center\" >\n          <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/SB3.gif\" alt=\"Side GIF 2\" width=\"300\">\n        <\/td>\n      <\/tr>\n    <\/table>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Gameplay\/Client code<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-accent-6-color has-alpha-channel-opacity has-accent-6-background-color has-background\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\"\/>\n\n\n\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">Made code for little demo purposes \u2013 a combination of classical unity OOP and Morpeh framework ECS<br>Including:<br>- Two control modes: car driving and camera (that can shoot balls)<br>- Change of daytime on single key<br>- Destruction system (for both can and some world objects)<\/pre>\n\n\n\n<p align=\"center\">\n    <img decoding=\"async\" src=\"https:\/\/xidriel.me\/wp-content\/uploads\/2025\/04\/test2.gif\" alt=\"Gif1\" style=\"max-width: 100%; height: auto; display: block;\">\n<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-custom-main-blue-color has-alpha-channel-opacity has-custom-main-blue-background-color has-background is-style-default\" style=\"margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)\"\/>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<h1 class=\"wp-block-heading\">USED<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-accent-6-color has-alpha-channel-opacity has-accent-6-background-color has-background\" style=\"margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)\"\/>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">From Unity asset store:<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">- <a href=\"https:\/\/assetstore.unity.com\/packages\/3d\/environments\/urban\/white-city-76766\">White City, ALIyerEdon<\/a><br>- <a href=\"https:\/\/assetstore.unity.com\/packages\/p\/prometeo-car-controller-209444\" data-type=\"link\" data-id=\"https:\/\/assetstore.unity.com\/packages\/p\/prometeo-car-controller-209444\">PROMETEO: Car Controller, Mena<\/a><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">Code:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">- <a href=\"https:\/\/github.com\/scellecs\/morpeh\">Morpeh ECS Framework<\/a><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">Unity Registry:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">- Input System<br>- Cinemachine<br>- ProBuilder<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"border-radius:0px;border-top-style:none;border-top-width:0px;border-right-style:none;border-right-width:0px;border-bottom-color:color-mix(in srgb, currentColor 20%, transparent);border-bottom-style:dashed;border-bottom-width:1px;border-left-style:none;border-left-width:0px\">Original Assets<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vt-323-font-family\">- Lots of ambient 3D model stuff was made in Blender by a friend of mine. All the files located under \"..\/Assets\/Models\/Benefactor\/\"<br>- And, of course, the car model is not mine. It was included in the original repo<br>- All the other stuff was made by me both in Blender and Houdini<\/pre>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>My first take on graphics programming with a custom Unity SRP with deferred rendering. Testing scene included <\/p>","protected":false},"author":2,"featured_media":479,"comment_status":"open","ping_status":"open","sticky":false,"template":"wp-custom-template-post-standard","format":"standard","meta":{"iawp_total_views":26,"footnotes":""},"categories":[12],"tags":[41,44],"class_list":["post-477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","tag-graphics-programming","tag-showcase"],"_links":{"self":[{"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/comments?post=477"}],"version-history":[{"count":28,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/posts\/477\/revisions"}],"predecessor-version":[{"id":762,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/posts\/477\/revisions\/762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/media\/479"}],"wp:attachment":[{"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/media?parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/categories?post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xidriel.me\/ru\/wp-json\/wp\/v2\/tags?post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}