[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1711642427736632.jpg (63 KB, 750x747)
63 KB
63 KB JPG
3 days left edition

/gedg/ Wiki: https://wiki.installgentoo.com/wiki/Gedg
IRC: irc.rizon.net #/g/gedg
Progress Day: https://rentry.org/gedg-jams
/gedg/ Compendium: https://rentry.org/gedg
/agdg/: >>>/vg/agdg
previous: https://desuarchive.org/g/thread/99704279/#99704279

Requesting Help
-Problem Description: Clearly explain the issue you're facing, providing context and relevant background information.
-Relevant Code or Content: If applicable, include relevant code, configuration, or content related to your question. Use code tags.
>>
you will never be a developer with a released product that made more money than it cost to produce
>>
>>99748155
Considering the development time and inflation rate this statement is clearly not true.
>>
File: output.webm (3.04 MB, 1920x1080)
3.04 MB
3.04 MB WEBM
The new version with the improved terrain tool is now live on itch.

Controls:
>Left click : Raise
>Right click : Lower
>Shift left click drag : Level
>Ctrl left click : Smooth
>= : Increase brush strength
>- : Lower brush strength
>Shift = : Increase brush size
>Shift - : Lower brush size

>>99748155
Jokes on you, it only cost me time.
>>
>>99748155
Didn't ask jew
>>
Gaming being full of mentally unhinged people rather than normies, families, and nerds that love games really demotivates the love or thought of making a game sometimes
>>
>>99748243
Everyone plays games now including all the people you mentioned
>>
>>99748243
Normies are the mentally unhinged people retard-chan
>>
>>99748243
just target the latter group. you can't control who buys your product
>>
>>99748422
>just target the latter group. you can't control who buys your product
Best advice, thanks. I just feel a little jaded, that’s all. I’ll probably take the Japanese cut out response of “please understand” if any of those people have objections to my game design
>>
>>99748714
Stop inventing imaginary scenarios to get mad about
>>
>>99748180
where
is
your
product
>>
>>99748155
good think i have a stable job so any benefits from gamedev is a bonus
>>
>>99748155
good thing i live in my mom's basement and have near zero living costs
>>
File: works.png (15 KB, 349x178)
15 KB
15 KB PNG
Well this does indeed work. Guess I'll add a big chunk of replaces in the textbox script before the text is shown.
Next problem is getting access to things that aren't stored in global singletons like the last used move, but that's just a matter of connecting nodes like spaghetti
>>
File: 1460408784112.jpg (12 KB, 255x214)
12 KB
12 KB JPG
Anyone know what BSB files are? Do they contain meshes?
>>
>>99748243
You sound like some bitter cunt that's jealous attention is being spent somewhere else.
>>
File: maxresdefault.jpg (89 KB, 1280x720)
89 KB
89 KB JPG
>>99748243
>normies
Devs trying to cater to "normies" is unironically how one of my favorite games got ruined.
Normies won't give a shit about the actual game anyway, they follow whatever is considered popular.
>>
>>99750379
That describes 99% of people posting on this goatforsaken Ancient Greek fish paste forum
>>
>>99748243
this is why I only post here about it for now
evolution software attracts the worst of the schizos and trust me, you don't want that as your marketing team
I'm ashamed to say one of those is responsible that we got captcha's on 4chan now
so yeah I feel you but if that's what's stopping you from gamedev you don't have the passion and your motives are alien to me
>>
>>99748220
Looks janky as fuck but it's good that you've got the brush tool done.
>>
>>99752660
Janky is my middlename.
>>
I wanna add acceleration/deceleration to my movement
should I just use some easing function or implement physics? I kinda don't wanna open up the physics can worm desu senpai
>>
>>99748220
is this a sims clone or im going schizo
>>
>>99754042
bro your +=
>>
>>99752229
There's nothing stopping anyone from going and starting a normie studio and hiring a bunch of normies to make games with but this is 4chan.
>>99754042
Just go balls deep, velocity verlet is easy.
>>
>>99754042
You use first order discretization / numerical integration like eulers method:

v += a * dt
x += v * dt
>>
>have a sovlful idea for vidya for a uni project
>have to do an asset flip instead
just fucking kill me already
>>
>>99754100
>>99754141
>>99754179
yea you're right it's kinda ez on second thought
>>
>>99754190
don't waste sovlful ideas on uni homework, do it in your spare time as a side project
>>
>>99748243
My game is schizo design. It's for me and me only. If people want to give give me money for the chance to follow my vision, it would be very appreciated, but it is irrelevant at the end of the day.
>>99749321
>>99749820
Good thing I have both of these
>>
>>99754402
>both of these
holy based........
>>
>>99750361
Hell of a rabbit hole you're sending dumbasses like me into. I assume you mean the data files for TK17. It sounds like they're just generic archives. There's a copy of TKShellTools archived on LoversLab which should be able to open them.
>>
bumping your mom
>>
>>99754090
take the meds
>>
>>99754190
Alternatively, use your sovlful idea for your uni project and continue working on it after you submit it. Coursework or not I'm not going to create something I don't find fun myself.
>>
imagine if both your parents were programmers and they groomed you to be one as well so that one day you can all NEET it up and work on a family game engine
>>
>>99754090
It's "what if the sims but you run a walmart"
>>
Alright, I've confirmed I can just do random fucking shit in custom BBCode tags, in this case printing the name of a global singleton to console. So it can access other nodes. Problem is it does it every damn frame. I want it to go once and then shut the fuck up.
>>
Working on implementing skinned mesh rendering
>>
>sdl + ogre + cegui
I know I can use all of these together somehow but is it possible for the following:
>sdl to handle window and inputs
>cegui to handle 2d menus
>ogre to handle 3d
>want sdl to manage switching between 3d and 2d contexts
>when I hit "start game" it unloads the menu and loads the 3d portion
>when I hit menu, it unloads the 3d and loads the 2d menu
Any idea how this can be done?
>>
>>99756122
i take your bait
>>
>>99756160
maybe not bait
>>99756122
2D is just 3D with less steps. Same context
>>
>>99756160
I might just be retarded

>>99756213
I was sort of under the impression that cegui was a separate thing entirely and I'd create something like:
>sdl_window.setRenderer(ogre_rendeder)
>ogre_scene
>cegui_scene
>sdl_window.setScene(ogre_scene)
>if M pressed -- sdl_window.setScene(cegui_scene)
Have I completely misunderstood how these libraries work?
>>
>>99756358
you just dont render the menus when you want to render a scene and vice versa
its as easy as having an if statement
>>
I just realized the person who wrote the scenario for a old capcom gameboy game in 1999 is a programmer for palworld and he didn’t do anything game related in between then and now. What a fucking chad.
>>
>>99756056
Wtf thats exactly what I'm doing
>>
bump
>>
File: pbr.png (34 KB, 704x567)
34 KB
34 KB PNG
>PBR shading
I'm still fucking something up, as can be seen from the yellow torus, even though I copied almost verbatim from learnopengl. Probably because I'm working in view space instead of world space.
I'll clean up my code and implement materials + textures properly first so I can stop relying on gl_InstanceIndex hacks.
>>
>>99757183
look at this guy too:
http://www.d6.com/games/index.htm released a game engine prototype 25 years ago, and now he has a mildly successful early access game on steam, zero in between.
>>
How would you make cpu rendering fast enough? I'm talking really low resolution here, like less than 256x256, and not even 3D graphics, just tiles and spritea.
>>
>>99760790
You can draw 2D tiles and sprites just fine at any resolution, you don't need any special optimizations, 2D games were playing at 1024x768 before 3D accelerators
You can use SIMD to speed it up
>>
Wasted a lot of time on this so it may help somebody else:
>when static linking libc++ use -fuse-ld=lld as your linker and manually add -lc++abi, otherwise it won't work and it won't say why
>>
>>99760790
>cpu rendering
>fast enough
choose one
>>
>>99760790
It is fast enough. Does your game have more graphics than DOOM did?
>>
>>99755766
>what if the sims but you run a walmart
kek nice description of it
>>
>>99761176
I spent a whole day trying to get the master build of llvm going just because I wanted to play with C++23, realized I needed to compile libc++ as well. Did that and shit still wouldn't work.

Add a fuck ton of flags and some spicy CMake. It compiles but clangd is flipping out.

I'm just gonna use C++20 until they ship the next gcc/clang version.
>>
>>99760790
>less than 256x256
Yeah, my Pentium 1 could do better.
Just don't do anything stupid.
>>
>>99761250
like what?
>>
>>99760790
2D should be trivial, especially if 256x256

The main thing you need to pay attention to is memory access patterns. Make sure you write linearly to the buffer. If you're reading from a texture, read linearly too.
Consider using tiles instead of row-by-row. I can't find a good image right now but basically divide the framebuffer in sections of NxM where each block is linear in memory.

Depending on exact scenario there's more techniques, there should be plenty info online.
>>
>>99761241
i compiled gcc 14 a few days ago with what the guy from this video did
https://www.youtube.com/watch?v=yEySjvC4lSI
the guy used like 2 commands and it took me like an hour to compile with 12 parallel compile jobs
>>
>>99762205
Thanks anon seems a lot easier than deep diving into llvm docs and messing with CMake.
>>
I'm about to finish my deferred renderer (it's just some objects + point lights).
Now I want to try doing shadows for the first time.
I know it's a big field (lot of papers on it), but I saw that recently, more games are adding the option to do ray traced shadows.
So my question is simple: Why are ray traced shadow better than "rasterized" shadows?
>>
>>99762341
they are simpler
>>
File: pbr-compare.png (159 KB, 800x2400)
159 KB
159 KB PNG
>>99760073
Fixing this took me way longer than it should've had and I ended up doing it pretty much on my own.

The fundamental problem is this expression:
        vec3 numerator    = NDF * G * F;
float denominator = 4.0 * max(dot(N, V), 0.0) * max(dot(N, L), 0.0) + 0.0001;
vec3 specular = numerator / denominator;

Note that if denominator is 0, you get NaN or, with the +0.0001 hack, a very very large value. This only happens if either of the dot values is 0 or lower.

However, while scouring through numerous websites I stumbled upon a very helpful comment, paraphrasing:
>This shouldn't be an issue since the G factor is supposed to eliminate the dot(N,V) and dot(N,L)
Indeed, looking at it:
float G   = GeometrySmith(N, V, L, roughness);

float GeometrySchlickGGX(float NdotV, float roughness)
{
float r = (roughness + 1.0);
float k = (r*r) / 8.0;

float num = NdotV;
float denom = NdotV * (1.0 - k) + k;

return num / denom;
}
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
{
float NdotV = max(dot(N, V), 0.0);
float NdotL = max(dot(N, L), 0.0);
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);

return ggx1 * ggx2;
}

See those NdotV in GeometrySchlickGGX? And max(dot(N,V),0) and max(dot(N,L))? These just so happen to occur in the denominator! And on top of that, to numerator is just a bunch of multiplies, so we can easily eliminate those!

Setting num = 1.0 and denominator to 4.0 and I get the same result WITHOUT ARTIFACTS. See picrel. No visual differences aside from lack of artifacts.
(I did remove the 0.0001 to make the glitch obvious, but even with it and bigger factors it's there).
The bigger question is why it nobody else seems to have come up with this solution. Other projects seem to all copy straight from learnopengl. I feel like I'm missing something obvious.
>>
>>99762608
But there must be something about the image quality too. Otherwise games wouldn’t propose it as an option if they don’t add anything to the user but lesser fps
>>
>>99763010
bruh what can I tell you it's more closely mimicking reality so you don't have to hack shit in like reflections or soft shadows
I'm in awe someone who wrote a deferred renderer isn't aware of this or can't google this
>>
>>99761993
I think I see what you mean. So say you have 1 byte per pixel, and 8 by 8 pixels per tile, and 16 by 16 tiles the tilemap would be

byte 0 ... 63 : tile 0
byte 64...127: tile 1
and then within each tile it would be
byte 0 ... 7: row 0
byte 56... 63: row 7
>>
>>99763099
That is correct
>>
>>99763099
>>99761993
but how do I make the gpu draw that framebuffer correctly though? I mean textures aren't laid out like that
>>
>>99762898
Your GeometrySchlickGGX actually computes the Smith attenuation term, and your GeometrySmith computes the Schlick geometry term, or whatever the fuck it's called (it's been a while).
I actually ran into this exact same issue with my first renderer, despite following Karis's 2013 paper instead of LearnOpenGL (though I guess that ((r+1)^2)/8 thing is taken from Unreal...)
No idea what the fix is or what other people do though, I just mapped roughness = max(roughness, 0.1) and called it a day.
>>
>>99763118
GPUs actually do use tiling internally, though that's usually abstracted away via OpenGL/Vulkan/...

The tiling is mainly useful while rendering since instead of having e.g. a 16x16 texture overlap 16 rows and hence up to 16 cache line writes, it instead writes to at most 9 tiles (8x8 tiles, 3 row-wise, 3 column-wise), so at most 9 cache lines writes.
If the framebuffer you use is row-by-row and you use tile-by-tile, then you'll need to map the values afterwards.
>>
File: 1704020875458226.png (844 KB, 824x728)
844 KB
844 KB PNG
>>99763118
Pixel shader.
>>
>>99763214
>GPUs actually do use tiling internally, though that's usually abstracted away via OpenGL/Vulkan/...
I have never seen this
any links for information on how to just do this?
>>
>>99763303
I know that Intel iGPUs are able to switch between scanlines and blocks from a failed attempt at implement a from-scratch driver, which nearly broke my mind. It's somewhere in their PRMs.

For Vulkan there's special flags like VK_IMAGE_TILING_OPTIMAL (as opposed to VK_IMAGE_TILING_LINEAR).

Also look into "tiled rendering".
>>
>>99763303
Anon is underselling how much of a mess this is. Different GPUs can store and access images in different memory layouts.
I have this bookmarked, it's missing some stuff but IIRC it's a good introduction: https://fgiesen.wordpress.com/2011/01/17/texture-tiling-and-swizzling/
A handful of memory layouts I've seen:
>regular RGBA8 or whatever in arranged in a Z-order curve
>regular RGBA8 or whatever in arranged in a reverse-N-order curve (older PowerVR GPUs)
>NxN blocks of compressed texture data (ASTC, BCn, ETC, newfangled fixed-rate compression) in normal linear/strided layout
>NxN blocks of compressed texture data arranged in Z-order curve
>NxN blocks of either regular pixels in Z-order or compressed texture data (ARM AFBC, PowerVR FBC, Nvidia too maybe?)
>>
>>99761904

Shlemiel gets a job as a street painter, painting the dotted lines down the middle of the road. On the first day he takes a can of paint out to the road and finishes 300 yards of the road. “That’s pretty good!” says his boss, “you’re a fast worker!” and pays him a kopeck.

The next day Shlemiel only gets 150 yards done. “Well, that’s not nearly as good as yesterday, but you’re still a fast worker. 150 yards is respectable,” and pays him a kopeck.

The next day Shlemiel paints 30 yards of the road. “Only 30!” shouts his boss. “That’s unacceptable! On the first day you did ten times that much work! What’s going on?”

“I can’t help it,” says Shlemiel. “Every day I get farther and farther away from the paint can!”

Like this.
>>
>>99764054
kek
>>
>>99762898
That's basically what you should do for numerical stability, pre-cancelling terms in the BRDF with the PDF will be faster and more stable than computing everything and expecting it to work itself out since floats are approximate anyway.
https://jcgt.org/published/0007/04/01/paper.pdf
>>
>>99760790
if you need windowing and inputs anyways why the fuck would you not use SDL2 with cpu raster mode? cpu raster rendering into hardware accelerated texture is insanely fast you can even triple that resolution and it'll be nothing.
There are plenty of those fantasy consoles with low resolution that manipulate the screen like an array of colors on the cpu.
Limit your pallet hard enough and you can go as far as compressing a vline to 32 bytes (with 1 bit per color for black/white or whatever 2 colors you want). Even with a medium pallet you can make cpu blaze through it with SIMD and vectorisation. You compiler should do it automatically anyways in this case.
>>
>>99764881
>SDL2 with cpu raster mode?
Does this mean I get to color every pixel with the cpu?
>>
>>99765467
It means that SDL2 functions do that for you automatically when you draw lines or whatever, but you can get and set single pixels and basically reimplement those general SDL functions yourself.
you can basically do this
>https://github.com/ssloy/tinyrenderer/wiki/Lesson-0:-getting-started
except you output to an SDL2 texture instead of saving to an image. i'm recommending it because it has everything you'd want if you'd handle user inputs in the future, so you don't need a different library for every single thing.
>>
>>99748155
>not coding games for fun
>devving only cause thirsty for money
you deserve what you get
>>
Looking to survey some experience here:

Who here has paid money for art? What was the payment model like? Type of art? Typical deliverable schedule? Did it suck? Do you still work with them? Where did you find them? Full contracted part time or piecemeal? Was it worth it?

I'd really like to find someone willing to put skin in the game and (preferably) be good, but it seems like a long shot.
>>
>>99766991
I think you can expect to pay maybe $1000-$2000 a week for somebody decent, you can go lower but you get what you pay for
Asians are the best to hire, avoid Eastern Europeans / Russians
>>
>>99748143
Why aren’t people posting their games :( I want to see what you have been up to
>>
>>99767228
https://rentry.org/gedg-jams
>>
>>99767075
You're telling me I could have been a homeowner already if I'd picked art instead of computer science? Doesn't everyone working on game art make damn near minimum wage?
>>
>>99765647
hmm SDL 2 is ancient though
>>
>>99767339
No they make normal wages, working conditions just tend to be shit
>>
>>99767075
>Asians are the best to hire
amazing, should have thought of this
>$1000-$2000 a week for somebody decent
Was imagining $500 a month for about 20-25 hours of work a month, seems to be in line. Could definitely scale up later, but I think this would meet the speed at which I'm needing assets.

Another question to anyone, have you ever given pushback on something you paid for or asked for revisions. Just wondering if things might get pissy.
>>
>>99767376
>have you ever given pushback on something you paid for or asked for revisions. Just wondering if things might get pissy.
Professional artists know how to deal with this, they don't get pissy unless you don't know what you want
My first artist job I was drawing a grass tile and the dude kept sending it back telling me to make it "more juicy" about 5 times
Learn some art basics so you can explain yourself well, and most importantly provide references and examples to show what you want
>>
>>99767376
>Just wondering if things might get pissy.
If the artist gets pissy, drop him immediately.
>>
>>99767228
I've been mostly optimizing recently, so there's nothing to show.
>>
>>99767604
any screenshot, even if number go up, means bumping the thread
>>
https://developer.microsoft.com/en-us/games/articles/2024/02/a-year-of-game-development-improvements-in-visual-studio-2022/
It's a shame that VS doesn't have glsl support.
I'm forced to use vs code to code my shaders.
And apparently hlsl is row major, so matrix operations are left to right.
Fuck that.
>>
>>99768002
those are pretty insigificant complaints to be honest
>>
>>99768002
>uses bloatware
deserved
>>
>>99768075
How comes not having glsl support on vs is an insignificant complaint?
>>
>>99768118
you aren't gonna be writing a lot of shader code, it doesn't really matter
>>
>>99768002
>VS
How can people stand VS, especially when they could use Rider?
>>
>>99768210
>why do people not paypig for a text editor
We may never know
>>
>>99768151
>you aren't gonna be writing a lot of shader code
Da fuck are you talking about. Shaders are the core of any 3d program.
>>
>>99768301
<5% of your code will be shader code
>>
>>99768405
That totally depends on the thing you're working on.
I don't work in the industry, but apparently there's something called "3d artist" and they do nothing but shit out shader code (I saw that they even use some UI for that, something node based).
The engine is still responsible for the lighting properties (shadows, light reflection...). But stuff like surface property (so if you want to implement pbr) is thus shader code.
And let's not even mention the compute shaders: If I wanna do physic simulation, I guess that I will spend most of my time in the shaders. The engine will just manage data.
>>
>>99768560
You guess wrong, physics is nearly all on the CPU
Go look at the Godot GitHub, it's 1.8% shader code, that's typical
>>
>>99768405
>>99768864
what does % of code have to do with performance coming from optimized glsgl for your specific use case
you seem confused
>>
>>99769262
I'm saying you don't write a lot of shader code so it doesn't matter what IDE you're using
I did mine in notepad for a while
>>
I don't NEED realistic looking water
>>
File: Ckr.gif (1.7 MB, 800x450)
1.7 MB
1.7 MB GIF
every game needs realistic bouncy fun bags filled with milk, if your game engine don't support the boioioioiong, and the boing boing then your game engine is a failure
>>
>>99772197
I actually thought about it but you need to do phy*ics
>>
>>99772197
I don't want sub 40 IQ players so I will be leaving that out
>>
>>99772197
i want over 140 IQ players so i will be adding that too
>>
Thoughts on web games? Not itch, I mean actual web games. Supposedly js can do what flash used to? Not a web dev but surely it can’t be that hard, right?
>>
>>99772197
oh shit it's stellar blade dev, great game you've made dude. will 100% be pirating when it drops on PC
>>
>>99772319
>leaving out what 90% of gamers want
ngmi
>>
>>99773347
The usual html 5 stack is very capable these days, even better(just don't have the top tier tooling) and more performant than flash used to be. Can even go the web assembly way if you want to port something to the web or just don't want to deal with javascript.
>>
>>99776052
Wasn't Adobe going to port the Flash IDE to HTML5? What happened with that?
>>
>>99776365
Dunno, I think that's a feature in Animate now but probably has a ton of caveats.
>>
>>99748143
fuck stbi
>>
>>99778018
filtered
>>
>>99748155
If you have developed something, you are a developer. Nobody needs to reach your arbitrary requirements because you are irrelevant.
>>
>>99778116
not filtered, the library is just shitty, an absolute hack job that doesn't even pass my basic static analyzer tests
>>
>>99748143
anyone here can into full marketing photrealism webgl (and similar, whatever works works)?
I can offer you some bucks if the shit's good
>>
>>99778376
all it's supposed to do is load images and that's what it does
it doesn't handle error cases
>>
>>99778018
why
>>
File: 0 R76SDHvk8h-6ZJ0a.jpg (20 KB, 535x404)
20 KB
20 KB JPG
Does occlusion culling make sense on mobile/web platforms? While we can significantly reduce overdraw, i'd imagine the calculations to deduce what to draw aren't free.
>>
>>99779251
That depends much more on the scene you're drawing than the platform you're on
>>
>>99773347
What's wrong with publishing platforms like itch.io?
>>
File: playing.jpg (503 KB, 959x720)
503 KB
503 KB JPG
>>99779363
I think the platform needs to be taken into serious consideration though. Mobile platforms have some serious limitations on certain effects desktop and console targets are used to. For example lighting isn't done per pixel and is more often entirely static because mobile platforms just cant into compute.

My goal would be Indoors where there are lots of objects both behind, under and above the current room, maybe maximum of 4% of the level is visible at a time, so I think the potential could be great, but at the same time I believe most engines do depth-prepass for surfaces anyway, so it might not be a dealbreaker.
>>
File: 423wetgsdbx.jpg (75 KB, 908x498)
75 KB
75 KB JPG
>>99779458
To bring some context, I'm trying to cope with the fact that the engine I'm using forgets about occlusion culling on web exports even though every preview shows it correctly, it just doesen't happen. Before I add tons of stuff it'd be nice to take a few minutes to consider whether what I'm aiming at is actually doable, or would it matter at all. While premature optimization isn't usually adviceable, I think selecting the right overall big concepts to rely on is still wise.
>>
>>99779458
It also depends how big the levels are and how complex the geometry is
You should test it with a sample scene before deciding whether to implement it or not
>>
>>99779525
why don't you just fix the bug or submit a bug report.
Anyways, occlusion culling doesn't seem like something you need to plan for in advance.

Probably a very basic occlusion culling algorithm wouldn't be expensive and could cull a good amount.
>>
>>99779617
I'm not sure about whether it's intentional on web exports, which is why I'm trying to figure out if there'd be any reason to. I wouldn't want to submit the nth ticket that gets immediately closed as something every dummy requests. Maybe I'll bother the devs with a ticket anyway.
>>
>>99779657
it's typical etiquette in any situation to see if your question is answered elsewhere (i.e. an existing ticket, closed or not) before asking.
But if you can't find one then you absolutely should. If it confuses you it will confuse others and should be fixed or communicated better what the result will be.
>>
>>99779458
there's no way to know if it's worth it until you test it out, it's completely subjective
>>
just found out Mike Acton already left Unity last year and started a series called
>Port a Unity Game to Your Own Engine
lmao
>>
>>99779251
General answer is yes, but it mainly depends on geometry complexity and how much overdraw you'd otherwise have.
Frustum culling is definitely worth it since it's very simple and cheap.
Culling objects behind other objects should be cheap, but it's trickier since a naive algorithm is O(n^2) so if you have many objects you'll need to organize them somehow.
You can cull static geometry yourself by checking where the player is and whether it's possible for the player to see something at all. e.g. underground dungeon.
>>
File: 1690251359004128.jpg (34 KB, 700x491)
34 KB
34 KB JPG
I have a lot of free time on my PC
where do I even start to learn stuff?
>>
>>99781669
google.com
>>
>>99781669
>where do I even start to learn stuff
shut the fuck up. without fail everybody who asks that question is a stupid pajeet or low motivation fag who is never ever going to make it.
>>
>>99781669
By doing what nobody in this fucking thread is doing. Reading a fucking book.
>>
I am implementing dual contouring.
>>
File: compute_voxel.webm (3.03 MB, 1280x720)
3.03 MB
3.03 MB WEBM
>>99781669
you start doing what you want to do.
Then you run into an obstacle.
Then you use learning resources (online or book) as reference to solve your issue / learn more about it.

Rinse and repeat. do not get stuck in "Oh first I learn read this book watch this course then I will be ready!"

Just follow the above advice.
>>
Don't give effort replies to people asking questions they could easily Google
>>
>>99779251
Overdraw isn't as much of an issue on mobile. Triangles are more expensive than on desktop, but fragments are basically free.
Occlusion queries work about as well on mobile as on desktop, with all the same drawbacks. They're really hard to get right.
HZBO is easier, and it can work pretty well if you use a small set of artificial occluders and keep the object counts down.
Anything fancier like the Umbra/Intel/DICE software zbuffer thing or depth reprojection nonsense is likely a bad idea.
There are other CPU-based techniques but whether you can use any of them depends on your game.
Web is more complicated, I'm not qualified to talk about it (un)fortunately.
>>
>>99782037
i always do my dual contouring before i go out
>>
bump and SDL3 is the chosen one
>>
File: it's over.jpg (60 KB, 442x442)
60 KB
60 KB JPG
>>99748143
PROGRESS DAY ENDS IN A LITTLE OVER 4 HOURS
>>
I make next big RPG.
Sales go wild.
They say "He came from /gedg/ born and raised."
>>
>>99786725
and then you get cancelled
>>
>>99786725
No will remember /greg/ in 75 years
>>
>>99786743
There's only two ways to "get cancelled":
>work for some company that will cuck and fire you
>you cancel yourself
Just tell the tranny on Twitter to shut the fuck up, what can they do? Absolutely nothing, they weren't gonna buy your game anyway.
>>
>>99786725
good luck, bonus points if you sneak a "nigger" or a swastika somewhere
>>
>>99786982
Once when I was finishing up a game for release my friend drew a giant dick on the last level and I almost didn't catch it
>>
>>99782327
What are you talking about? Overdraw on tiled gpu's is aids.
>>
File: hdr_b_cloudy001.png (527 B, 16x33)
527 B
527 B PNG
Does someone know what colorgrading standard this file is? Or is it Capcom proprietary? It's used in ReEngine.
>>
>>99779251
>>99781645
For most cases you can create occlusion objects out of primitives per model and render into a zbuffer type thing (doesn't have to actually be on gpu). Next check the bounding box/sphere's of what you are rendering are occluded in that buffer (it can permit more than it needs to for peformance). A way to do this is instead of using a 2d buffer, instead sort the occluders into zones of N number of depth layers (probably logarithmic spaced), and just write into the buffer for each layer as a 3d texture/array in an aliased way. This way you don't have to "render" out each box or sphere virtually, you can just sort by distance. This assumes occluders are spheres or AABB though. Thanks for reading my schizo post.
>>
>>99786920
good point.
They'd cancel me anyway as soon as they enter the game and see women being captured and put into harems.
>>
>>99787417
well 'try to cancel', since as you said , you only cancel yourself.
>>
>>99767075
What's wrong with slavs
>>
>>99787379
>527 B, 16x33
woopsie there mate
>>
>>99767376
Artists usually have policies like they send you their work half way through and that is the only critique you get for that commission. Beyond that you need to commission them again. This avoids a sucky cycle of back and forth.
>>
>>99787301
It... shouldn't be?
On Arm (post-2013) and PowerVR (Rogue and newer I think? + all current Apple chips probably) the GPU will sort fragments by depth before shading (assuming no blending, depth write, etc.)
Quick search suggests Qualcomm might not do this, though I can't find any recent reports.
Have you run into this in practice recently?
>>
>>99754042
https://gafferongames.com/post/integration_basics/
>>
>>99787474
Yeah, the file size is the same as dds which is not normal. When I recreate the dds it's only about 5B. But since I could convert it to png is it some data inherent to image files? Or is it some engine proprietary metadata? And what kinda colorgrading is this anyway? It's not a normal LUT.
>>
>>99787464
They're assholes and a pain to work with and might try to scam you
>>
>>99787496
The depth priming doesn't change the fact that you still have to do a depth pass per pixel per triangle, and depth-prepassing isn't a tile/mobile specific thing either so it isn't a benefit that mobile has over non-mobile. Tris are still cheap, fillrate is still the killer.

Tiled gpu's are tiled not for the sake of overdraw, but to reduce memory required because any intermediate buffers only need to be as big as a single tile, and not the whole screen. It's a memory bandwidth constraint, it doesn't make them any better, otherwise you'd see all gpu's using this optimization (if it helped with fill rate every gaming gpu would be tiled since fill rate is the serious bottleneck now in gaming).
>>
>>99787716
Also to explain why I said overdraw on tiled gpu's was aids, I meant that overdraw on tiled gpu's is *still* aids. Also tiled/tiled gpu/etc can all mean different things (like tile based rendering on gaming gpu's is not what I've been referring to, when I said tiled I meant colloquially mobile tiled based gpu's, which because they're mobile gpu's are still horrendous with overdraw, much worse than non mobile gpu's).
>>
File: cd53.png (1.08 MB, 1800x768)
1.08 MB
1.08 MB PNG
now that the progress day deadline is over
I hate deadlines
well, in this current period I'm not coding but conceptualizing I'm thinking my engine can do both the critterding and the stunt coureur but not at once ever since the rewrite like (pic related)
so that's the next target. which will require some restructuring, placing physics and graphics under /sys maybe
>time for some bedtime note taking material
>>
>>99787942
>children
>children
>children
>children
>children
anon, I...
>>
>>99787973
>omg 2D structuring on a 2D screen wtf
>>
>>99786767
who's /greg/?
>>
>>99787973
makes me sick
>>
>>99787993
The friends we lost along the way
>>
>>99787942
sovlful engine UI rather than that soulless minimalist imgui garbage.
>>
>>99748143
I am writing a vidya. It's a little sidescroller. I played around with coding some basic movement, but mostly I've been sticking to the Design Document, because words are easy. I have a story I would like to tell, and am writing the script for it, but I keep changing my mind. It's been sitting untouched for a couple of months now. I have a character concept, but I genned it using SD, and I need to actually craft the character's appearance and sprite. That's going to be an adventure.
Or maybe I should save this for a second title, and try something simpler first. Like some kind of galaga clone or some shit.
>>
>>99787999
I miss you, anon
>>
>>99788002
oh shit, that's an attempt of getting qt to work inscreen with opengl, and it sucks.
I'm was also adding Imgui to the new version
I might pay more attention to ingame qt now that you expressed feel towards it
>>
>>99788012
what is your first and foremost target you need to achieve to get to your goal, focus on that. nobody tells you in any tutorial that the dopamine hit you'll get from working towards and achieving your first goalpost will propel you to next target. rinse and repeat.
it'll feel small, you're wasting hours on a detail. that's just it though.
>>
File: textures.png (64 KB, 564x557)
64 KB
64 KB PNG
Images in Vulkan strongly displease me.
Why do they have so many damn flags. And synchronization and whatnot.

Also spent a bunch of time making a (so far untested/unused) texture packer before I realized it's pretty much useless on modern GPUs. I'll just make a commit now and then throw it out.

I also REALLY need to start cleaning up the code.
>>
>>99788224
To make sure you can do any little thing you want to the images. Any single tinkering step. It's for real tinkerer gnomes.
>>
>>99787716
Is "depth priming" Unity's name for a depth prepass? On the tilers that optimize this case you shouldn't even be doing that, I don't think.
>>
>>99788153
You are right anon. Find a target, and stick with that. I'll find a target.
>>
I decided to take the night off and get some stuff done.

PROGRESS DAY ENDS IN LESS THAN 1 HOUR
>>
File: 1000008195.jpg (181 KB, 990x990)
181 KB
181 KB JPG
Progress day may end, but that doesn't mean the progress ends. Show it off in June with /v/3 2024!
https://itch.io/jam/v3-2024
>>
can I use unreal 5 for 2d games? newfag here, every youtube video comparing engines say the same meme, godot is promising, unity has drama, and unreal is for 3d, I'm just worried of wasting time learning godot only to eventually move on to unreal, and that's the same feeling I get from gdevelop, supposedly easy to use but I have to learn that before I make any games, and it's just a matter of what's the most economical use of time if I plant o make video game in all sorts of manner while i experiment around
>>
>>99789535
You have a ton of options for 2D, there a dozens and dozens of viable engines out there, Unreal is an overkill
>>
>>99789535
Just use opengl or monogame
>>
>>99789535
Why not just use SDL? It's not that difficult. All the fluff of big engines doesn't really add much to me, I keep things simple.
>>
>>99789535
use raylib
>>
>>99789535
Is there any possibility for developing on source 2? or is it just mods kinda
>>
File: file.png (5 KB, 587x326)
5 KB
5 KB PNG
i'm writing a software perspective renderer from scratch for fun
i guess i'm kind of an idiot
i've set up a basic obj importer, i've built some matrix manipulation functions, i'm constructing the model and view matrices correctly, multiplying my vertex positions by these matrices, sorting faces, changing the camera/view matrix...
but as i'm trying to get perspective projection working, it's.. blowing up a bit.
can someone help me figure out wtf i might be doing wrong? this is lua. i know this is probably borderline-sqt but it is very gedg related i think
-- per-vertex transformation
function transform_vertex(vert, model, view, proj)
local tf = vec(vert.x, vert.y, vert.z, 1)
tf = tf:matmul(model)
tf = tf:matmul(view)
tf = tf:matmul(proj)

local w = tf[3]
return vec(
tf.x / w,
tf.y / w,
tf.z / w
)
end

-- source of projection matrix:
function mat4_perspective(fovy, aspect, near, far)
fovy = fovy or (2 * math.pi * (60/360))
aspect = aspect or (16/9)
near = near or 0.01
far = far or 10000

local z_range = far - near
assert(fovy > 0 and aspect > 0)
assert(near > 0 and far > 0 and z_range > 0)

local m = mat4_identity()
local m1_1 = 1 / math.tan(fovy / 2)

m:set(0, 0, m1_1 / aspect)
m:set(1, 1, m1_1)
m:set(2, 2, -(far + near) / z_range)
m:set(2, 3, -2 * far * near / z_range)
m:set(3, 2, -1)
m:set(3, 3, 0)

return m
end

i'm basically taking the input vertices from the obj and stuffing them into transform vertex then stuffing it into my triangle renderer which.. is a big chonky boi that thus far has drawn triangles very correctly despite extensive attempts to trip it up, but if the transformation and perspective bits don't look wrong then i think i'm going to have to start pulling it apart bit by bit..
>>
>>99789535
anon why are you asking here? >>>/vg/agdg
>>
>>99792776
Matrix multiplication order perhaps?
>>
File: breakout.webm (469 KB, 1280x960)
469 KB
469 KB WEBM
working on breakout now
>>
>>99792776
The problem with answering these kinds of questions is that you wrote "all that shit you expect us to read" but you're gonna come back in like an hour and tell us the problem was something completely unrelated.
>>
File: screen.jpg (21 KB, 805x63)
21 KB
21 KB JPG
>>99779525
>>99779617
>>99779657

Continuation: it appears to be intentional, as per the picrel of docs:
https://docs.godotengine.org/en/stable/classes/class_occluderinstance3d.html
>>
Like a year or two ago I saw a youtube video of a popular guy who showed how he monetized an android game he made, but only on death, as to not make the ads intrusive. I remember he showed his google ad statistics and such. I'm developing a videogame myself and want to watch this video again. Rings any bells?
>>
>>99795128
Ads on death sound pretty intrusive
>>
>>99795276
Just don't die, loser
>>
>>99794682
Oh, ir's Godot. Expect a lot of shit to randomly juat not work because the devs are asstards.
>it's not suoported on web because of memory constraints
As if occlusion culling requires that much memory lmao.

Advice: just get whatever it is you want to do done and don't worry too much abput the details. If you do ask the devs will pull some bullshit about "philosphy", or whatever the fuck.
>>
>>99792776
Projection matrix looks fine at first sight.
Might be multiplication order as suggested, or you're confusing rows/columns (or both).
Judging by order of operations you're working with row-major matrices. Check if that's correct with whatever lib you're using. Try transposing the mat4_perspective matrix maybe?
>>
i'm writing a minecraft server (very original) and i'm struggling to get a reference for things like expected block and item ids, etc. currently looking through wiki.vg and minecraft wiki and cant find consistent information.
>>
>>99794682
Looks like this is the relevant issue: https://github.com/godotengine/godot/issues/70621
Kind of a mess, the documentation doesn't seem to be correct. It was disabled because it relies on SIMD, not because of memory issues.
Newer versions of Safari support SIMD, so you can probably ship a game with it enabled, if it works okay.
>>
bump
>>
File: check.png (187 KB, 839x681)
187 KB
187 KB PNG
Need to resolve this texture memory corruption issue. Seems like a problem.
>>
>>99793788
why does the ball get halfway into a block before it disappear? are you checking point inside rectangle instead of circle vs rectangle collision?
looks good, need more juice and collision feedback
>>
>>99796056
thanks, i'll give this a shot later! you've given me at least some keywords to help me refine my search.

>>99792916
the model matrix is just an identity matrix for now so i've omitted it then tested swapping the view and projection matrix multiplies, but to no noticeable improvement.

>>99793831
i've been hitting my head against it for a day or two of periodic dev time. haven't got it figured out yet.
>>
>>99799995
I just debugged a software renderer. What I did is substitute parts with glm until I found where the bug is.
>>
>>99800814
Are you me? I did the exact same thing.
>>
>Unity
>Hit play on a very simple scene
> 175% CPU use

Any solution for this ? I'm using Linux Mint, I found some threads about the same issue a few years old on the internet with no solution
>>
>>99801763
turn on vsync
>>
File: what do publishers do.png (276 KB, 1189x1010)
276 KB
276 KB PNG
is this what publishers do all day?
>>
>>99801961
Like you with your code are any different
>>
>>99801848
Thanks bud, but same thing with all vsync settings
>>
>>99795128
was it some kind of hardest game ever? called something like "stick to it"?
>>
>>99802206
Yup, thank you!
Stick with it was it
>>
>>99788224
Same here + I’m using dynamic rendering so I have to make the transition layout myself.
My code is so ugly/hardcoded just for two passes.
>>
>>99792776
It’s not model + view on the left but model + view + ortho projection. So you already managed to project 3D data on your screen.
By software renderer you mean you’re not using any 3D api?
>>
bump
>>
I'm trying to make a physics based ragdoll game in godot 4
my approach was to create a ragdoll using rigidbodies + 6DOF joints
first I tried using the default physics system and it was nice but it was also buggy as hell, some joints would randomly do a 360 along one of their axes or straight up everything would start vibrating and shaking and my ragdoll would soon fly out of the world
then i tried using Jolt.
jolt felt much stable, nothing was buggy and everything worked great but it feels very sluggish, i can't control the speed of the joints at all.
now i'm considering abandoning godot altogether.
is there any way to get decent joints in godot?
>>
>>99799992
It’s currently top left point of the sprite ye
>>
File: 1495647459953.jpg (9 KB, 300x222)
9 KB
9 KB JPG
>my windows build is still fucked

I CURSE YOU BILLY G
I CURSE YOU TO HECK
>>
File: 1706293433798563.jpg (26 KB, 365x397)
26 KB
26 KB JPG
>>99807062
Oh yeah, tomorrow will be a good day to play through some of the submissions. Look like you guys got a lot of input, so I'm really glad!

Tell me when you guys want the next progress day and keep up the good work!!
>>
>>99787526
nice read, but i don't understand how
v += a * dt
x += v * dt

is more accurate then

x += v * dt
v += a * dt
>>
>learnopengl.com
>skip to model loading
>none of the basic shaders the guy has in the tutorials work
>mfw actually going to have to go through all the tutorials up to that point to learn why its not working
My soul.
>>
why is it impossible to find good 3d reference sheets, none of them line up
>>
File: 1692830247851904.png (99 KB, 283x375)
99 KB
99 KB PNG
>>99807062
>My build is probably fine
>just bad instructions

PHEW!
>>
>>99807438
hope you're not a cmake masochist
>>
>>99807225
I don't think it matters much w.r.t. accuracy, but with the latter there's at least one frame of delay before acceleration is applied.
>>
What happens if I have no idea for a game?
>>
>>99809644
Do you want to make a game engine or a renderer?
>>
>>99809644
you are literally me
>>
How do I get past the retro 2d phase and into the much more lucrative retro 3d phase? I'm talking early ps2 and late ps1 titles
>>
>>99810609
you make your projection matrix be perspective instead of ortho
>>
bump
>>
>>99810642
...huh?
do I need to learn vulkan or something?
>>
>>99810609
retro 2D is much more lucrative for the solo developer, 3D is complicated
>>
>>99812471
It's really not. I'd use minecraft as an example. Nobody plays those 2d facebook games anymore, like bejeweled.
>muh stardew valley
fine, but for every starsew valley there are 100,000 2d shit games
but for every minecraft there are only 10,000
(all indie btw)
>>
>>99812538
Most indie games are 2D, most successful indie games are 2D
The reason for that is 3D is hard
>>
>>99812551
Why though? Why is 3D hard? I mean, how can 3D be hardee when most of the video game industry's tools are made now with 3D in mind?
>>
>>99812562
Everything just becomes exponentially more difficult once you move into 3D. Rendering, physics, art pipelines. In the 2D days bedroom coders could all make their own games, in the 3D era we needed to wait for shit like Unity to come along because the amount of knowledge required to make 3D games from scratch is so prohibitive
>>
>>99812595
>we needed to wait for unity
what kind of bullcrap is this? 3D games predate Unity by a lot. And I just gave minecraft as an example, which doesnt use Unity at all.
>>
>>99812620
I'm just talking about indie games made by single people. They were pretty much all 2D before Unity came along. Minecraft is an exception, Minecraft is also a really simple game
>>
>>99812631
ok
>>
>>99812562
Try and make a 2D game where you try to lift a bowl of cereal by spamming E, and now do the same in 3D. Compare the two, how much longer did the 3D game take?
>>
Why is z divided by w as well? I understand dividing by w for x, y for the sake of perspective projection but z doesn't need that. Why not doing some linear transform to map znear and zfar from 0 to 1 (vulkan ndc) instead?
Because that fucking pisses me off to see z value of close fragments looking something like 0.95645
>>
>>99814212
It's better for depth buffering because values that are closer have more precision
>>
>>99814475
You don't need to know any of this
>>
>>99814212
the idea is to have certain part have better precision, however it is quite a shitty distribution
>>
>>99808305
I don't have trouble wth cmake.

>>99809644
Start by cloning something I suppose.
>>
>>99815061
I think if you're starting out it's better to clone another game, how can you possibly innovate without having any experience
>>
>>99789535
use love2d if you want higher level language, or raylib if you want a lower level language
these "bring your own engine" frameworks are great for 2d
>>
>>99815600
raylib kinda trash tho
>>
>>99815888
depends what you're doing, for basic 2d game you can just combine it with box2d and get pretty decent base
what do you not like about raylib specifically? and what would be an alternative for it? the only other thing I somewhat liked was sfml but it lacks auto batching so it's not as performant
>>
>>99814224
wrong
>>99814768
wrong
>>99814212
because 1/z is linear in screen space, that means that the change in depth between two pixels is constant across the entire face of a primitive. This means that things like perspective correct interpolations become cheap, it's the primary enabler of the early fragment discard optimization and also lets you use the cheap ddx and ddy fragment shader functions.
>>
>>99816605
Thanks!
>>
>>99816605
>wrong
Read this https://developer.nvidia.com/content/depth-precision-visualized
>>
>Balatro gets more sales and attention than anyone slaving away on their own game
>made in fucking LOVE/Lua
What am I doing wrong?
>>
>>99817255
Nobody gives a shit what language you make your game in
>>
>>99817255
you care about outside factors, now stop nodeving
>>
>>99817255
Not marketing to streamers/zooms
>>
>>99817183
the precision of the depth buffer is a hindrance that needs to be worked around because of the benefits that I have already espoused to you make up for the draw backs, a linear depth buffer will always be more accurate, but cannot be optimized as already discussed.
>>
What IS balatro? I don’t understand how you can mix cards and rogue like genres together, can someone explain to a boomer who only played solitaire?
>>
>>99817384
Having more depth precision at closer distances is more desirable for a typical 3D scene
>>
>>99817436
get random cards each game
>>
File: engel.png (65 KB, 1003x327)
65 KB
65 KB PNG
>>99817446
>The second reason is that 1/z is linear in screen space, as noted by Emil Persson. So it's easy to interpolate d across a triangle while rasterizing, and things like hierarchical Z-buffers, early Z-culling, and depth buffer compression are all a lot easier to do.

I really think it was an accident + we need to set inverse z (zfar to 0 and znear to 1) to have a better precision.
So 1/z was for interpolation.
+ opengl completely fucked up by having -1 to 1 for depth
>>
>>99817543
Both reasons are correct
>>
>>99817446
The relative distance of objects in camera space is not affected by depth so it makes no sense to treat some areas with higher precision than other areas, any kind of depth testing visual glitches are going to be a bug. Having higher precision at the near plane is a side effect but it's not objectively better or even really desirable.
>>
>>99817573
>it makes no sense to treat some areas with higher precision than other areas
From a technical perspective this is true, from an artistic perspective it's the things up close that matter the most
>>
File: vulkan book.png (135 KB, 1247x378)
135 KB
135 KB PNG
I'm confused: Fragment shader is executed before depth test?
>>
>>99817682
Yes, the idea being that you can write to depth from the fragment shader.
>>
>>99817682
how else will you know what color you're going to overwrite with?
>>
>>99817682
Most of the time
>>
>>99817693
>Yes, the idea being that you can write to depth from the fragment shader.
Why would you do that?

>>99817694
??? You just do the depth test. If it passes, you execute the fragment shader.
If it doesn't you skip since that fragment won't be displayed.
>>
>>99817706
But then it's a huge waste of time shading a ton of fragments that potentially won't be displayed. No wonder why every engine does deferred.
>>
>>99817774
You can have the depth happen first but you have to follow some special rules with what you can do in the fragment shader.
>>
>>99817745
>??? You just do the depth test. If it passes, you execute the fragment shader.
>If it doesn't you skip since that fragment won't be displayed.
this is a ??? from my end, are you trying to correct me?
>>
>>99817812
It was meant to express my confusion
>>
>>99817745
>Why would you do that?
Why would you deny yourself the possibility?
Maybe you want to use a fucky distribution for depth buffer. Logarithmic was all the rage for a while.
Maybe you want to make a game like Teardown where the Z value at rasterization time is incorrect by design.
>>
>>99816294
>auto batching
huh
>>
>>99817774
Read what you posted
If it can prove that it can run the depth test before the fragment shader it will, but it can't always prove that
>>
>>99817995
It's an optimization where you basically put a bunch of sprites in the same draw call
Amateur engine devs think this is very important but for a 2D game it's really not
>>
>>99817255
you actually have to make your game to release your game, anon
>>
>>99818065
any good 2d engines that have nes/gbc tier graphics built-in?
palette swapping, raster effects, tilemaps etc?
>>
>>99818182
pretty much only pico8 which uses lua comes to mind which is not free to develop on, but apparently there is a web thing that is free, not sure if it's limited or something.
>>
Does a cookie clicker tower defense genre mix exist?
>>
bump
>>
it's over
https://youtu.be/kw9nTK42bTw?t=538
>>
>>99817774
Every decent forward renderer does a Z-prepass.
>>
>>99821246
>look at description
>he’s advertising with as a “AI consultancy” to help organizations implement chatgpt
I’m repulsed by grifters so much. Almost all of them used to be web3 shitters too
>>
File: nvidia.png (135 KB, 700x706)
135 KB
135 KB PNG
>>99821572
It's really confusing because I'm reading that since at least 2010, GPU are optimized to do z test n discard before fragment shading:
>"It's actually a bit of both. Per fragment operations should happen after the fragment program as you can see in this OpenGL ES 2.0 pipeline diagram. However, many modern graphic cards have an early z test that discards fragments earlier as long as you don't write to the depth in the fragment shader. "

Also I'm using the stencil buffer to cull so I can optimize my point light to only shade fragments inside the point light radius.
If stencil test is done after fragment shading, this optimization is pointless.
https://artis.inrialpes.fr/Membres/Olivier.Hoel/deferred_shading/Deferred_Shading_nv.pdf
>>
>>99821776
You sound like you're worrying too much about trivial details
>>
>>99817255
You just need an idea that will hook people, and to actually complete the project.
>>
>>99821818
an autist, on /g/? perish the thought
>>
>>99821572
There are counterexamples, but I guess you would just say they're not decent :^)
>>
>>99821572
If you have little overdraw it may make sense to skip a z-prepass.
>>99817774
Deferred isn't always better. Clustered forward rendering is apparently faster due to needing less memory bandwidth.
For example, DOOM 2016 uses forward rendering https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/
>>
>>99821744
>so focused on this one thing
can you point on the doll where the chatgpt touched yout?
>>
>>99821776
Every GPU your game will ever run on does early depth and stencil tests.
>I'm using the stencil buffer to cull so I can optimize my point light to only shade fragments inside the point light radius
What the fuck am I reading? How would you even...?
>>
>>99822658
For each point light I do a stencil pass where I mark the fragments that are inside the light volume.
Then I draw the sphere of the light and shade only the fragment inside the light radius thanks to the stencil buffer.
It's exactly like in the nvidia paper that I linked.

But the major flaw of this technique is that I'm doing a draw command for every single light source.
So I plan to switch to tile shading instead.
>>
>>99748155
>more money than it cost to produce
How much does it cost to make your own game for the fuck of it during your free time? Considering you build EVERYTHING yourself so you're not buying any assets or hiring an artists or audio guy.

Are you including rent, phone bill, car insurance, medical (if you're American), school expenses (if you're American), gas, utility bill, Netflix sub as production cost?
>>
>>99822780
This seems... very obsolete? How would it be cheaper to do three fucking geometry passes instead of just reading depth in the fragment shader and checking if it's in the volume?
>>
>>99822885
I think he's talking about deferred rendering
>>
>>99822885
There's just one geometry pass.
then for each pointlight, because you only one to shade the portion of the image their radius covers (to save performance), you first render a sphere so that your fragment shader is executed for the fragment covered by your light radius. Then you do your shading thanks to your gbuffer.
The flaw of this is that you don't take the depth into account, hence the stencil pass to be sure that your fragment is inside the sphere.

But apparently it's an old technique and nowdays everyone uses tiles. So fuck it, but at least it allowed me to learn about the stencil buffer, etc.

>>99822893
Yep.
Btw, do you guys know the difference between forward + and Tile-Based Deferred Rendering?
>>
>want to game
>can't get a model to load properly in opengl
I don't know what I'm doing
>>
>>99822940
I don't think anyone has used this in a production deferred renderer in the past decade? Engines just do the naive thing (get top fragment from gbuffer, check if it's in volume, shade, blend).
This optimization might even be slower on any vaguely modern HW, fucking with stencil funcs and ops might have unreasonably high overhead. In Vulkan you'd need to swap pipelines twice for each light.
>nowdays everyone uses tiles
The only major deferred renderer in use today is Unreal's I think, and they use a view-space 3D light grid aka "clustered deferred", not tiles.
>>
>>99823319
>In Vulkan you'd need to swap pipelines twice for each light.
yup lol, one pipeline with raster only to fill the stencil and one pipeline to shade.
But my goal was also to learn how to do mrt/multipass and stencil/depth buffer in vulkan.
>The only major deferred renderer in use today is Unreal's I think, and they use a view-space 3D light grid aka "clustered deferred", not tiles.
That's what I was scared of. So there's no friendly guide like learnopengl to learn the standards that the industry have been using for at least the last 10 years.
>>
im dying from deving, its 4 am and there's still so much i want to implement/refactor
>>
I'm writing a game with network capabilities using two separate threads per connection. One reader thread. One writer thread. Is this still the most viable option nowadays? It works very well in my case but i had a few struggles setting up cleanup code between them when non-clean disconnects happen on the websockets.
>>
>>99825376
I wouldn't create threads for something as undemanding as network communication
>>
>>99825376
what framework?
>>
>>99825392
I read in a book that decoupling game logic thread from the network related stuff is the way to go.

>>99825409
No frameworks actually, just using golangs http package with a golang implementation for ws
>>
>>99825516
The standard threading model for games is you have a job system which allocates a fixed number of threads and dispatches jobs to them, the naive "one thread per task" model has several issues
>>
>>99825376
Two threads per connection will get expensive quick.
Look into async I/O. You don't need a very fancy framework for it, just something that allows you to check whether you can read/write to a socket without blocking should be sufficient.

>>99825516
Golang's "g"oroutines aren't threads. They're more like very lightweight tasks managed in userspace. Golang is designed to handle a lot of I/O via goroutines so it should be fine.
>>
>>99816605
retard, you doesnt understand the distribution of floating point numbers
>>
>>99826353
>you doesnt
Minor spelling mistake. You lose.
>>
>>99826393
sorry saar i am india
>>
>>99823239
gltf?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.