1. Past hour
2. ## Anyone who wants to write a little game engine?

That isn't usually the intended gameplay experience. Designers and programmers have enough on their plate already without trying to support this kind of thing. But the physics glitches are the whole point of Goat Simulator! Every other game tries to polish that stuff away; Goat Simulator revels in the glitches. It's a parody of a game; it's supposed to be terrible, but in a funny way. "So bad that it's good." Those glitches are clearly amusing enough to keep a non-trivial amount of people entertained, or the game wouldn't be as popular as it was. The whole time I was playing Goat Simulator I was trying to break the physics. Especially with that absurdly long tongue... I think I was having the most fun when I was trying to stick my tongue to the car or the hang glider. Or watching the animations freak out when I blew up the gas station. The most disappointing things in Goat Simulator for me were the parts that didn't overreact and break.
3. ## Why is Eclipse the most popular Java IDE?

Eclipse is a good platform for specialized IDE tools, thanks to general purpose foundation libraries that work well (e.g. EMF/GEF), its robust (although heavyweight) OSGI infrastructure, and its development tools for plugins and variants. It's extensible but it avoids the anarchy of Visual Studio and other less refined IDEs.
4. Today
5. ## Ancient History/Mythology Consultant Available

Hi there, My name is Dan and I am offering my services free-of-charge as an ancient history and mythology consultant to any independent developers that think they can use me. I have a PhD in Classics, and am willing to offer expertise in all aspects of ancient Greece and Rome, whether historical or mythical. I’m also a freelance gaming journalist and an avid gamer, so I understand games and a bit about the development process. I can be flexible with your needs, which could be anything from answering specific questions, to providing background on a topic, to reading through scripts, to anything else you can think of. I’m not precious over historical accuracy and totally get that sometimes the needs of the game come first! I’m new to this, so as I said I’m willing to do this for free right now, but would appreciate a credit in the final game and a testimonial if you’re happy with what I do. Any and all questions will be gratefully and enthusiastically received at goad.daniel@gmail.com or on twitter @dangoad. Dan
6. ## Anyone who wants to write a little game engine?

Thoughts of gamer: Yeah, that's what you gamedevs do all the time. But i spot it! I want to be able to stack a pile dead ragdolls above each other, so i can climb up and pick up the shiny power up rotating there above. It would be so satisfying... i would feel so clever... But i can't do it. Because you lazy gamedevs just turn off ragdoll to hide you are unable to do proper physics. Now i can walk through the dead body as if it would not exist... lousy fakes. Decades ago you promised us physics would revolutionize games. But we never saw something batter after HL2, all you guys have learned is to turn physics OFF, but never to turn it ON. ...better going watching a movie now... ;P Ha, i wanted to mention Goat Sim too. Yes it was fun but it also is really a good example of terrible physics in games. Because the player IS free to have fun with physics, glitches happen all the time. Even this game is about nonsense, it glitches too much to KEEP being fun for longer than a minute. Trying to do something interesting always ends up in jitter, collapsing, tunneling or whatever. Probably i'm more triggered here than the average gamer, but i know we could do better. It's not that i disagree with your arguments, but there are options not explored yet. We should go there
7. ## Anyone who wants to write a little game engine?

Oh, for sure. My point was just that most games don't need to focus on accuracy beyond stuff that's illusion-breaking. Very few space games even try to model orbital mechanics, for instance. You don't need an exactly accurate flight model in an arcade flight simulator. Hell, you may not even need to put in exactly accurate integration to get around stuff like jittering ragdoll bodies - just find a way to detect the jittering and then disable the ragdoll code for that body. I don't know. I had a lot of fun messing around in Goat Simulator, but maybe that's the exception that proves the rule here.
8. ## Where to find the correct DirectX SDK ?

Ok, thanks for the info. Is there not a problem that i accidently install the to new version for my system ? btw : i have no internet connected to my programming computer, is that a problem ? I still have visual studio 2005 the profesional edition with box and discs, is that a problem ? The weird thing is i can only find this link : https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812 It has a file from juny 2010, a bit old.
9. ## DX11 Triangulation of a polygon in HLSL

Hi guys So back in the day, GDI+ had the option of filling a polygon shape where the polygon points were specified in a sequential order, rather than in triangle index order. I am writing my own 2D rendering library using DX11, and I am mimicking the GDI+ function signature mostly. So now my question is, has anyone ever tried to triangulate a GDI+ polygon in an HLSL shader? Thanks JB
10. ## Where to find the correct DirectX SDK ?

There is no separate DXSDK since DirectX 10, it's bundled into the Platform SDK/Windows SDK, and the SDK "runtimes" are deployed through Windows Update. The latest Windows SDKs are kind of bundled with Visual Studio 2017 (you can select them in the installer), but you can download it separately if needed.
11. ## Looking for a Hobby-Dev Partner

Hey Lucas, I'm new joiner in this community as well. And I have the same goal to find group of people and work on some game. I have a few project right now. But they moving to slow. One of them is strategy game with online multiplayer (I've implemented multiplayer using Photon) and some stuff for kids. I use Unity for my gamedev activities. In real world I'm Software Engineer in Test. And I work with Java, Python, TypeScript, C#. Also right now I work a lot with AWS. I think that we can collaborate with all who interesting in the same thing. Brainstorm the ideas and start to work on the Best Game Ever I just created channel in Discord https://discord.gg/w2kfZTZ Hope That will see some one there!
12. ## Windows 10 makes old games crash fullscreen

I made a new topic in the beginner section :
13. ## Where to find the correct DirectX SDK ?

Hi where can i download the correct DX SDK ? I have Windows 7 + Radeon HD 5850 videocard. with a fast search : The video card supports DX11,2 the windows 7 with updates seems to support up to 11.1 Is this real ?, can i not install the DX11,2 SDK on windows 7 ? Maybe i need the SDK 11,1 version then. Only i can not find the 11,1 or 11,2 SDK anywhere.? Where do i download the older SDKs ? thank you
14. ## Pathfinding??

Actually all i need is to define clear pathways as separated rects. I failed to imagine that thats why i asked. So thebquestion should be how to define a movable worksapce here
15. ## Windows 10 makes old games crash fullscreen

My game does not looking like a payd game right. thanks for the replys
16. ## Managing pointers upon object destruction in C++

After reading the article, are you finding it troublesome to get started and getting rid of your pointers? A handle is just a unique integral number assigned by some authority, a manager. The outside world must not induce anything from the handle itself. In order to get the contents behind a handle, you must ask a manager, which will do a lookup (implementation of which is private and hidden!). Every time. You don't store pointers to the returned values. You don't care and mustn't care where they are in memory. Think about it this way: Instead of pointing your finger towards a troll that attacked you and risking that the troll gets lost behind a wall (and aliens abduct it from there) so you'd be pointing to a void space where you just think a troll should be, just remember the number tattooed on the troll's forearm. Every time, every frame, when you want something with it, ask the Troll Registration Bureau: "Hey, is troll XY still alive? And if yes, where is it?" The nuts and bolts would be how to assign unique handles, how to organise the contents in memory, how to to optimise the cache access... however first you need to set up the interface and throw in any basic implementation, and only optimise in case it is a bottleneck. The troll manager might have a hash-map<Handle,Troll> style dictionary, in a naive implementation. Every time it's asked, it'll look into the hash-map and return nullptr if it doesn't find anything (or anything alive). And if it does find it, it can actually return a POINTER (!) but you must not store it for later use. Just use it and forget it. Next time, it might return a different pointer for the same handle, for example if it did some kind of defragmentation.
17. ## Determine Collision Point and Normal (3D SAT AABB-AABB)

I learned SAT and applied for AABB. It gives me part of the answer. To have the full answer, I need S-H clippings. But S-H clipping is so hard. @Finalspacetold me how to combine SAT result with S-H clippings for AABB. I don't have much experience of implementing like that. Can anybody share sourcecode? even one bit? please, I wouldn't ask if I knew
18. ## PDF manual?

It is possible to use doxygen to generate a pdf instead of the HTML manual. http://www.angelcode.com/angelscript/documentation.html You can get the doxygen project and the source files from the SVN (as described in article above), then change the config for doxygen to generate the output as pdf. I cannot vouch for the quality of the pdf document, but hopefully it will be good enough.
19. ## Virtual Machine Questions

Do you mean to say VirtualBox is not a VM, or that installing a pre-made image in VIrtual box is not installing an OS? I would be suspicious of installing arbitrary systems downloaded from a random place on the internet from unknown persons. Especially on a poorly-secured unaudited home network. Brings to mind the work 'pwned'.
20. ## Anyone who wants to write a little game engine?

What about rust? The language is really clean and I like it. Also I think you can get away with managed languages like C# just fine if you don't intend to create an AAA tier engine. Example: https://github.com/xenko3d/xenko
21. ## Dev Diary #003

Re-Release from 21th of January 2019 Dev Diary; Hi, and welcome again for the weekly dev diary of Project Taival! I have been busy with the marketing side of things, which has left less time to the game it self, but I managed to get two things done at once - recorded a video while I was doing the details for one room of the apartment building. The Timelapse I'm currently editing the #timelapse video, but are having a hard time learning the scripting side of AviSynth. This would be a good thing to learn to automate much of the video processing work in a lossless manner. The problem is, that what first seemed to be working, now appears to be too much for my computer to handle, as the plugin I need to use is old and doesn't handle big files well. More precisely, the plugin fills the entire RAM and throws a fatal error after over 22000 processed frames. I'm currently looking for ways to automate video segmenting to smaller files, which should get around this error. I'll be updating the #progress on either the next Dev Diary or before, if I get the problem solved earlier. Detailing the Room Kitchen counters and cupboards. I decided that I would first try to finish one room, so that the end results are seen faster. This should also streamline the progress a bit, as the generic cupboards are found in every house in this apartment building. There will be more individual assets to every house, so that none of the interior decorations are the same, but it's good to start with assets that are to be used most often. I'm also exploring how it will affect the size of the game, if I integrate some assets with the underlying architecture. For example, if I make the baseboards/skirtings integral to the floor. This would save very much time when I need to put the assets to right places in the Game Editor. There has also been many videos, that give great lessons on how a starting game developer can maximize the efficiency of the workloads. I especially like to watch the Game Dev Underground and Atmos Games for reference on how to be a successful indie game developer. If you have any interest in being a Game Developer or have interest in Indie Games in general, I would warmly recommend these channels. Situation on #YouTube in general Since it would take time off from my game development, doing comprehensive talking videos might not be the best choice at this point - including the lack of suitable space to do recordings. Most efficient way that I have thus far come up with is to record timelapses and possibly record my speech either for the entirety or part of the video, if I'm not using music in the videos. Second topic on this issue is the teaser, which I would like to complete as soon as possible. After doing some research, it seems that doing it in Blender might actually be the best way to make it, so back to learning blender for me. The learning experience has been really sporadic for me, as I need to try and handle everything at this point on development and building a audience base is one of the more important things even at early on, to show where you come and what have you learned. Most important thing to show here is how willing are you to learn new things. Website planning I'm also planning on the style for a website for the game and I think I have found a suitable style for both, desktop and mobile users. I'll be releasing more details about this on the next weeks Dev Diary. If you have any recommendations on the layout or graphics for the theme (dark, snowy winter), please feel free to make suggestions That's it for this weeks Dev Diary, thank you for your continued support.
22. ## Dev Diary #001

Re-Release from 7th of January 2019 Dev Diary; Welcome to the first actual Dev Diary. I will release a Dev Diary every week on Monday to keep you updated on the progress of the game, Project Taival. Unfortunately I don't have a lot of new content to share today, as I got a flu on the next day after posting the announcement, but I did manage to get the ground level rooms finished before my condition worsened. I still need to do the plasterboard walls and windows which I will begin to work on tomorrow. I will begin on working the minute details, like the skirting boards, cupboards, stoves, as well as window frames and panels after the whole building is first ready. To summarize some features of the game, here is a short list of things; - The game will be in First Person perspective. - It is going to be divided in multiple games, so be sure to expect a sequel. - All the final assets are going to be original content or modified from free assets. - Paid assets remains a possibility, depending on the amount of donations and pre-orders. - The game is based on modern days, but the roots of the story are much deeper in time. - 2 layer game world, similar to Silent Hill, but different. Want to help out? I'm also exploring ways to give some unique extra content to those who have pre-ordered or donated a certain sum. If you can give pointers on the most efficient and secure way to do a database, in which I could easily handle the distribution these special game codes to those who have funded the game in this very early stage, please let me know. A tutorial to setting up such a database would be much appreciated I'm also toying with the idea that if this project gets a funding of 100 000 USD in total within a year, it could be possible to hold a raffle among all the sponsors, in which one lucky person could get an artwork based on the Lore of the story. I saw this amazing looking glass art on a video and thought that it could have a fitting look for a physical collectibles item of this game, as well as be fitting for anyone, gamer or non-gamer alike. But there is still plenty of time to figure that out What do you think, should there be physical collector's items for the early buyers? I'll also post a brief get-to-know-me post at some point here to introduce my self and my aspirations for all to see. No matter how ambitious my vision for this game is, I do know that the road will be long and hard and I probably can't achieve as much as I hope for, in as little time I wish a could. But I'm committed to this project so deeply, that I wish to do it for my livelihood. Thats it for todays Dev Diary, have a splendid week and tune in for more on next Monday!

24. ## 3D animation pricing

Hi, did you get help with this?
25. ## Determine Collision Point and Normal (3D SAT AABB-AABB)

That code is actually more or less a copy of Erin's code from Box2D Lite, but modified for polygons: https://github.com/erincatto/box2d-lite/blob/master/src/Collide.cpp
26. ## Project Taival - Dev Diary #003

You can find all the earlier dev Diaries on my Reddit page here; https://www.reddit.com/user/ProjectTaival Hi, and welcome again for the weekly dev diary of Project Taival! I have been busy with the marketing side of things, which has left less time to the game it self, but I managed to get two things done at once - recorded a video while I was doing the details for one room of the apartment building. The Timelapse I'm currently editing the #timelapse video, but are having a hard time learning the scripting side of AviSynth. This would be a good thing to learn to automate much of the video processing work in a lossless manner. The problem is, that what first seemed to be working, now appears to be too much for my computer to handle, as the plugin I need to use is old and doesn't handle big files well. More precisely, the plugin fills the entire RAM and throws a fatal error after over 22000 processed frames. I'm currently looking for ways to automate video segmenting to smaller files, which should get around this error. I'll be updating the #progress on either the next Dev Diary or before, if I get the problem solved earlier. Detailing the Room Kitchen counters and cupboards. I decided that I would first try to finish one room, so that the end results are seen faster. This should also streamline the progress a bit, as the generic cupboards are found in every house in this apartment building. There will be more individual assets to every house, so that none of the interior decorations are the same, but it's good to start with assets that are to be used most often. I'm also exploring how it will affect the size of the game, if I integrate some assets with the underlying architecture. For example, if I make the baseboards/skirtings integral to the floor. This would save very much time when I need to put the assets to right places in the Game Editor. There has also been many videos, that give great lessons on how a starting game developer can maximize the efficiency of the workloads. I especially like to watch the Game Dev Underground and Atmos Games for reference on how to be a successful indie game developer. If you have any interest in being a Game Developer or have interest in Indie Games in general, I would warmly recommend these channels. Situation on #YouTube in general Since it would take time off from my game development, doing comprehensive talking videos might not be the best choice at this point - including the lack of suitable space to do recordings. Most efficient way that I have thus far come up with is to record timelapses and possibly record my speech either for the entirety or part of the video, if I'm not using music in the videos. Second topic on this issue is the teaser, which I would like to complete as soon as possible. After doing some research, it seems that doing it in Blender might actually be the best way to make it, so back to learning blender for me. The learning experience has been really sporadic for me, as I need to try and handle everything at this point on development and building a audience base is one of the more important things even at early on, to show where you come and what have you learned. Most important thing to show here is how willing are you to learn new things. Website planning I'm also planning on the style for a website for the game and I think I have found a suitable yet simple style for both, desktop and mobile users. I'll be releasing more details about this on the next weeks Dev Diary. That's it for this weeks Dev Diary, thank you for your continued support.
27. ## RPG Maker Choices (Demo) is out, now!

Hi everyone! I just released the Free Demo for my first real game, Choices! You can download it, here - https://jami-cassidy.itch.io/choices-demo I hope you like it! Any feedback is appreciated and welcome. Enjoy!
28. ## Choices (Demo)

Hello! This is the current Free Demo for a game I am working on called 'Choices' and it takes about 90 minutes to get through. Faster if you rush, slower if you take your time, of course. I don't like spoilers, so I won't say too much about it, actually! A man is suddenly teleported to another world. The game is 2D with pleasant simple graphics and a nice soundtrack. You can play it with a keyboard, a mouse, or a controller. You can find it on itch.io here - https://jami-cassidy.itch.io/choices-demo Enjoy!
29. ## A Functional Impass - Advise me on how to proceed? (C#)

Perhaps, I'm jumping to conclusions but it seems from your last two posts that you don't understand how to override virtual functions in C#. You need to make the functions in the base class virtual, or better yet define the functions you need in an interface, in order to override them in the derived class. Then when you call runAction it will get handled by the version in the derived class. I can't remember whether you can override properties in C#, so you might need an interface composed only of functions. Googling 'overriding in C#' should get you the information you need. I'm posting from my phone right now, but if this isn't clear I'll write a more detailed post when I get home tonight.

31. ## Anyone who wants to write a little game engine?

@JoeJ Are you sure that physics glitches are no fun? People like to share them on the internet and laugh at them so much that sometimes I wonder if developers leave them in games on purpose, just for the sake of guerrilla marketing.
32. ## MMORPG Brilliant Game Idea.

Oh god yeah, that one is a real drag. Totally ruins the balance of the game IMO. Replayability rating of zero from me! 😂
33. ## How fragment derivatives are actually evaluated within the 2x2 group

It is greate to know there are coarse and fine version of ddx and ddy.it seems that those version are not available in shadertoy, i will check them out later and do some further test using dx11，thank you！
34. ## MMORPG Brilliant Game Idea.

Yeah i play this game too. I'm quite addicted as i've been playing it for 38 years. It started off OK with lots of fun quests, but now they have introduced lots of grindy quests such as that repeatable one called 'career'...
35. ## Point light question

Sorry, I had a double up in my constant buffer code. Had it in my render cycle twice and of course I was adjusting the first call, which was getting over written. So, I have removed that. Things are looking better now. Thanks again for your help. I'll have a play and see if I run into any problems.
36. ## ImGui not rendering to back buffer

Solved. I was using 2 separate descriptor heaps to pass CPU and GPU descriptor handles.

38. ## Point light question

Thanks @_WeirdCat_ I have changed the VS to this; VS_OUTPUT vs_main(VS_INPUT input) { VS_OUTPUT output; output.fragmentPosition = input.position; output.position = mul(input.position, matWorld); output.position = mul(output.position, matView); output.position = mul(output.position, matProjection); output.fragmentPosition = mul(input.position, matWorld); output.normal = mul(input.normal, matWorld); // Pass paramters to the pixel shader //output.normal = input.normal; output.textureCoord = input.textureCoord; output.lightPosition = lightPosition; output.lightAmbient = lightAmbient; return output; } And the PS to this float4 ps_main(VS_OUTPUT input) : SV_TARGET { float3 lightColor = input.lightAmbient; float ambientStrength = input.lightAmbient.w; float3 ambient = ambientStrength * lightColor; float3 norm = normalize(input.normal); float3 lightDir = normalize(input.lightPosition - input.fragmentPosition); //float diff = max(dot(norm, lightDir), 0.0f); float diff = max(dot(lightDir, norm), 0.0); float3 diffuse = diff * lightColor; float3 result = (ambient + diffuse); return squareMap.Sample(samLinear, input.textureCoord) * float4(result, 1.0f); } The light is now fixed in position as the object, which is great. But, the light can't be positioned now, the lightPosition co-ordinates don't respond to what I am putting in. It is locked in the same place regardless of its values. Thanks again for your help
39. ## D3D12 Fence and Present

No, it's still necessary as a command inside the command list in order for the command list to be correct, I just wanted to clarify that while the normal role of barriers can include synchronization, this specific barrier is not synchronizing with presentation directly, but the rest of the things it's doing are still important. As for buffer count, the number of buffers you ask for is the number of buffers you get, period. If you ask for 3 buffers, there are 3 buffers. The reason for the comment on that page was simply to contrast with D3D9 swapchains, where you specified a back buffer count instead of a buffer count, so there was sometimes one more than what you asked for. Also, D3D12 doesn't support blt model, so there are no copies. The resource is either consumed by a composition pass, or directly by the screen. While a resource is being scanned out or composed from, you can't write to it.
40. ## Determine Collision Point and Normal (3D SAT AABB-AABB)

@Finalspace I found a wonderful source code for Sutherland-Hodgman clipping. But it's in 2D and an advanced one.https://github.com/RandyGaul/ImpulseEngine/blob/master/Collision.cpp I don't know how to use it for an AABB.
41. ## Sling Bot Boarding

Album for Sling Bot Boarding
42. ## Point light question

You don't multiply normal by world matrix of the object (the rotation and translation) this is why it fails output.position﻿﻿ = mul(input.position, matWorld);﻿﻿﻿ you do exactly the same for output.normal then you calculate normal direction from light to this position, then you can do max(dot(lightdir, output.normal), 0.0);
43. ## Anyone who wants to write a little game engine?

The reason i want accuracy and robustness in game physics does not contradict your opinion: I want it to avoid things like jittering dead ragdoll bodies, players getting stuck in complex geometry, a box that jitters just because i hold it against a wall with gravity gun, etc. Those things are illusion breakers and the wall of smoke and mirrors becomes obvious much too often. This is no fun. This just said to point out an aim towards doing things correctly does not go too far, even if it's just games what we are after. It is always profitable towards any goal of game design. It is always possible to tweak a robust physics simulator to do non realistic things if desired, but mostly impossible to tweak a limited simulator to solve harder problems robustly. The same thing applies graphics as well.
44. ## MMORPG Brilliant Game Idea.

For many this idea is actual life. Quests like fishing and bowling etc... That's regular stuff that I can do in the most realistic sim of all... Reality.
45. ## How fragment derivatives are actually evaluated within the 2x2 group

GPU's generally use both forward differencing and backwards differencing to compute partial derivatives within a quad. Forward differencing is basically what you're describing: you look at the pixel with address + 1 in the X or Y direction and compute the difference. Backwards differencing is the reverse of that: you look at the pixel with address - 1 and compute the difference from using that. By using both, the GPU can avoid having to access the next quad/group, and can instead only use values from within the quad to compute the derivatives for all 4 pixels. This is certainly what's going on in your shadertoy example: pixel 0 would compute the derivative by calculating p1 - p0, and pixel 1 would also compute the derivative by calculating p1 - p0. GLSL actually doesn't say much about how dFdx/dFdy work under the hood: they give the implementation a lot of leeway to calculate the result however they see fit. However they explicitly call out the forward/reverse differencing method as an example of a valid approximation that GPU's are allowed to use. Scroll down to section 8.13.1 of the GLSL spec for more details. HLSL/D3D go a bit further, since the coarse/fine versions specify that the values will either be constant across a quad (coarse) or varying per-pixel (fine).
46. ## How fragment derivatives are actually evaluated within the 2x2 group

ddx_coarse / ddx_fine (D3D) or dFdxCoarse / dFdxFine (GL), are described pretty well here: https://stackoverflow.com/questions/39579150/difference-between-dfdxfine-and-dfdxcoarse If you just use ddx / dFdx, IIRC, you're letting the driver choose between ddx_coarse / ddx_fine for you. If you have GPU Pro 2, there's an article called "Shader Amortization using Pixel Quad Message Passing" that goes into a good amount of detail. The GL spec (linked in that stackoverflow answer) should define their inner workings too
47. ## Point light question

Even tried sending the lights own world matrix and it still spins with the rotation of the first object. I'm officially confused. cbuffer WVPCB : register(b0) { float4x4 matWorld; float4x4 matView; float4x4 matProjection; } cbuffer LIGHT : register(b1) { float4x4 matLightWorld; float4 lightPosition; float4 lightAmbient; } struct VS_INPUT { float4 position : POSITION; float3 normal : NORMAL; float2 textureCoord : TEXCOORD0; }; struct VS_OUTPUT { float4 position : SV_POSITION; float3 normal : NORMAL; float2 textureCoord : TEXCOORD0; float4 lightPosition : COLOR1; float4 lightAmbient : COLOR2; float3 fragmentPosition : COLOR3; }; VS_OUTPUT vs_main(VS_INPUT input) { VS_OUTPUT output; output.position = mul(input.position, matWorld); output.position = mul(output.position, matView); // WV position of the model output.position = mul(output.position, matProjection); // Pass paramters to the pixel shader output.normal = input.normal; output.textureCoord = input.textureCoord; output.lightPosition = lightPosition; output.lightAmbient = lightAmbient; output.fragmentPosition = mul(lightPosition, matLightWorld); return output; }
48. ## 3D How fragment derivatives are actually evaluated within the 2x2 group

I have recently read an article(http://www.aclockworkberry.com/shader-derivative-functions/) ，which was very informative for me。however，there weren't too much details about how the derivatives actually work by explaining them pixels by pixels under the group, only one example was shown there which was too intuitive. but when i came to other pixels in the group, things got really tricky and confusing.for better illustration of my question, Let's just take an example here, say, i have a rendertarget like this: According to the article,the horizontal derivative for some value in pixel[0] is obtained by subtracting the value itself from the correspondence in pixel[1]. Since they are in the same group ,both values can be easily fetched.Great！but how about pixel[1]? if same rule is applied the horizontal derivative should be calculated base on pixel[1] itself as well as the value in pixel[2]. but at this time the two pixels are in diffrent groups! similar situations accured when you perform the vertical derivative for pixel[4]. Well, i was originally thinking maybe there was some fancy driver features that can make it happend. unfortunately the result was not what i expected after i made some experiment. this simple code below failed my assumption:(you can test it and see the result in shadertoy your self ) void mainImage( out vec4 fragColor, in vec2 fragCoord ) { int oddRow = int(fragCoord.x) % 2 == 1 ? 1 : 0; //fragCoord是屏幕空间坐标 float xDerivative = dFdx(float(oddRow)); fragColor = vec4(xDerivative,xDerivative,xDerivative, 1.0); } if my supposition is correct, the screen shoud be alternated with white and black tiles alone the horizontal direction like this: but the result is pure white which is surprisingly not the case. So,can anyone shed some light about this problem for me. i also goggled a lot of places with no luck, all of them told you the pixels were handled in such a way, but no one really focused on specific situations as i have mentioned above.I think anyone who works with ddx ddy should absolutely have an clear understanding of this. Much appreciation！
49. ## Point light question

Thanks for your advice Promit. Do you mean like this? VS_OUTPUT output; output.position = mul(input.position, matWorld); output.fragmentPosition = output.position; // Put light in correct place? output.position = mul(output.position, matView); // WV position of the model output.position = mul(output.position, matProjection); As this gives the same result. Or do you mean to send the light to the shader in a 4x4 matrix like you would with any other model? Thanks for your patience. I am new to this side of things and still getting my head around it.
50. ## Virtual Machine Questions

Hard to say. You do not know if there is any Service Pack installed, or updates, or VC runtimes, what DX version, etc. (Those images are intended for web dev, i found another for Win10 UWP development. They surely have some updates and maybe even IDEs preinstalled?) You can narrow this down by knowing what your application depends on, but at some point you can never be sure. Even real installation CDs exist in various versions i guess. But if you have one and you know it's old, i'd trust this the most.
51. ## Point light question

You're computing your fragment position in view space, but your light is presumably defined in world space and that's where you leave it. Personally I find it much easier and more intuitive to do all my lighting in world space rather than the old school view space tradition. Just output position times world into the shader, and then everything else will generally already be in world space.

• 0
• 0
• 0

• ### For Beginners

Public Group  ·  1 member

• ### GameDev Challenges

Open Group  ·  86 members

• ### Unreal Engine Users

Open Group  ·  4 members

• ### Optimization Strategy

Open Group  ·  1 member

• ### Publishing and Monetization

Open Group  ·  1 member

1. 1
2. 2
Rutin
35
3. 3
JoeJ
16
4. 4
khawk
14
5. 5

• ### Member Statistics

• Total Members
253204
• Most Online
6110