
Similar Content

By mister345
Hi, can somebody please tell me in clear simple steps how to debug and step through an hlsl shader file?
I already did Debug > Start Graphics Debugging > then captured some frames from Visual Studio and
double clicked on the frame to open it, but no idea where to go from there.
I've been searching for hours and there's no information on this, not even on the Microsoft Website!
They say "open the Graphics Pixel History window" but there is no such window!
Then they say, in the "Pipeline Stages choose Start Debugging" but the Start Debugging option is nowhere to be found in the whole interface.
Also, how do I even open the hlsl file that I want to set a break point in from inside the Graphics Debugger?
All I want to do is set a break point in a specific hlsl file, step thru it, and see the data, but this is so unbelievably complicated
and Microsoft's instructions are horrible! Somebody please, please help.

By Kirlim
I'm working a lot with identifiers types to help me while debugging or managing collections of instances in my code. Previously, I had using directives as the following example code:
using AnimalId = unsigned int; using TreeId = unsigned int;
After a while, I accidentally mixed AnimalId and TreeId in my logic, so I've decided to use structs in order to make the identifiers strong typed. To avoid code duplications, I've created a template
template <typename TypeTag, typename ValueType> struct IdType { ValueType value; // Methods for comparison and hashes };
However, I believe there's two different ways of using this template:
// Using directive struct AnimalIdTag {} using AnimalId = IdType<AnimalIdTag, unsigned int>; // Inheritance struct TreeId : IdType<TreeId, unsigned int>;
And here is where I got in doubt. It seems both ways are valid, but there should be some differences. For example, with inheritance I can forward declare the TreeId on headers, which doesn't seem really feasible (in a painless way) with AnimalId. However, TreeId uses inheritance, and my knowledge on how inheritance and templates works "in background" is too weak to say, but it feels like there might be some hidden drawback.
Are there differences to make deciding which one to use easier? Or there's currently no drawbacks (besides being able to forward declare or not)?

By komires
We are pleased to announce the release of Matali Physics 4.0, the fourth major version of Matali Physics engine.
What is Matali Physics?
Matali Physics is an advanced, multiplatform, highperformance 3d physics engine intended for games, virtual reality and physicsbased simulations. Matali Physics and addons form physics environment which provides complex physical simulation and physicsbased modeling of objects both real and imagined. The engine is available across multiple platforms:
Android *BSD iOS Linux OS X SteamOS Windows 10 UAP/UWP Windows 7/8/8.1/10 Windows XP/Vista What's new in version 4.0?
One extended edition of Matali Physics engine Support for Android 8.0 Oreo, iOS 11.x and macOS High Sierra (version 10.13.x) as well as support for the latest IDEs Matali Render 3.0 addon with physicallybased rendering (PBR), screen space ambient occlusion (SSAO) and support for Vulkan API Matali Games addon
Main benefits of using Matali Physics:
Stable, highperformance solution supplied together with the rich set of addons for all major mobile and desktop platforms (both 32 and 64 bit) Advanced samples ready to use in your own games New features on request Dedicated technical support Regular updates and fixes
The engine history in a nutshell
Matali Physics was built in 2009 as a dedicated solution for XNA. The first complete version of the engine was released in November 2010, and it was further developed to July 2014 forming multiplatform, fully manage solution for .NET and Mono. In the meantime, from October 2013 to July 2014, was introduced simultaneous support for C++. A significant change occurred in July 2014 together with the release of version 3.0. Managed version of the engine has been abandoned, and the engine was released solely with a new native core written entirely in modern C++. Currently the engine is intensively developed as an advanced, crossplatform, highperformance 3d physics solution.
If you have questions related to the latest update or use of Matali Physics engine as a stable physics solution in your projects, please don't hesitate to contact us.
View full story

By Manumeq
Hello everyone.
Me and a bunch of classmates are making a videogame from scratch in c++. We are currently using the Irrlicht Engine in our code, but will begin to develop our own engine in a couple of weeks. One of our concerns right now is the User Interface.
After doing some research, I found several libraries for creating a GUI in c++, problem is in the past we have spent more time learning and figuring out how to make things work with libraries than we would have if we actually made the entire code from scratch ourselves.
So, I wanted to ask more experienced game programmers out there, what would be your preferred choice? using a library or writting the code from scratch when making an UI, and in case of the libraries, which ones would you use?.
Heres what we will most likely do:
Healthbars Displaying numbers in HUD Displaying icons (images) in HUD Drawing game menu elements (text and rectangles) Also, we are currently working in linux, more specifically Manjaro KDE and without IDE's (using our own make file and the console).
PD: Sorry in advance is this is in the wrong topic, It's my first time asking a question in GameDev.net

By isu diss
I implemented the paper, Numerical Methods for Mie Theory of Scattering by a Sphere, Link:https://prints.iiap.res.in/bitstream/2248/72/1/Numerical Methods for Mie Theory of Scattering by a Sphere.pdf
Unfortunately, my implementation is not accurate. I couldn't find any mistakes in my code. Can anyone help me?
struct XMDOUBLE2 { double x; double y; XMDOUBLE2() {} XMDOUBLE2(double _x, double _y) : x(_x), y(_y) {} explicit XMDOUBLE2(_In_reads_(2) const double *pArray) : x(pArray[0]), y(pArray[1]) {} XMDOUBLE2& operator= (const XMFLOAT2& Float2) { x = Float2.x; y = Float2.y; return *this; } }; XMDOUBLE2 Complex_Add(XMDOUBLE2 z1, XMDOUBLE2 z2)// z1 + z2 { return XMDOUBLE2((z1.x + z2.x), (z1.y + z2.y)); } XMDOUBLE2 Complex_Subtract(XMDOUBLE2 z1, XMDOUBLE2 z2)// z1  z2 { return XMDOUBLE2((z1.x  z2.x), (z1.y  z2.y)); } XMDOUBLE2 Complex_Multiply(XMDOUBLE2 z1, XMDOUBLE2 z2)// z1*z2 { return XMDOUBLE2(((z1.x*z2.x)  (z1.y*z2.y)), ((z1.x*z2.y) + (z1.y*z2.x))); } double Complex_Norm(XMDOUBLE2 z)// z { return sqrt((z.x*z.x) + (z.y*z.y)); } XMDOUBLE2 Complex_Division(XMDOUBLE2 z1, XMDOUBLE2 z2)// z1/z2 { XMDOUBLE2 tmp; if (Complex_Norm(z2) != 0) { tmp.x = ((z1.x*z2.x)+(z1.y*z2.y))/((z2.x*z2.x)+(z2.y*z2.y)); tmp.y = ((z1.y*z2.x)(z1.x*z2.y))/((z2.x*z2.x)+(z2.y*z2.y)); } return tmp; } //m = 1.5+i0.0 void MieCoefficient(XMDOUBLE2 m, float r, float Lamda)//m = (m')+i(m"): complex index of refraction, r: radius of the spherical particle in um, lamda: wavelength in nm { #define TOTAL_MAX_TERMS 2100 double Alpha[TOTAL_MAX_TERMS], Beta[TOTAL_MAX_TERMS], P[TOTAL_MAX_TERMS], Q[TOTAL_MAX_TERMS], R[TOTAL_MAX_TERMS], S[TOTAL_MAX_TERMS], B[TOTAL_MAX_TERMS], C[TOTAL_MAX_TERMS], C_[TOTAL_MAX_TERMS]; XMDOUBLE2 A[TOTAL_MAX_TERMS], G[TOTAL_MAX_TERMS], H[TOTAL_MAX_TERMS], a[TOTAL_MAX_TERMS], b[TOTAL_MAX_TERMS]; for (int n=0; n<TOTAL_MAX_TERMS; n++) { Alpha[n] = 0; Beta[n] = 0; P[n] = 0; Q[n] = 0; R[n] = 0; S[n] = 0; B[n] = 0; C[n] = 0; C_[n] = 0; A[n] = XMDOUBLE2(0, 0); G[n] = XMDOUBLE2(0, 0); H[n] = XMDOUBLE2(0, 0); a[n] = XMDOUBLE2(0, 0); b[n] = XMDOUBLE2(0, 0); } // float Lamdaum = (float)Lamda*1e3; float x = 23.1f;//((2*XM_PI*r) / Lamdaum); //int MAX_TERMS = (int)(x + 7.5f*pow(x, .34f) + 2); int MAX_TERMS = (int)(x + 4*pow(x, 0.33f) + 2); //Wiscombe if (MAX_TERMS<TOTAL_MAX_TERMS) { double y1 = x*m.x; double y2 = x*m.y; XMDOUBLE2 z = XMDOUBLE2(y1, y2); double zNorm = Complex_Norm(z); double y = zNorm*zNorm; for (int n=MAX_TERMS; n>0; n) { Alpha[n] = ((((2*(double)(n))1)*y1) / y)  P[n]; Beta[n] = ((((2*(double)(n))1)*y2) / y) + Q[n]; P[n1] = (Alpha[n] / ((Alpha[n]*Alpha[n]) + (Beta[n]*Beta[n]))); Q[n1] = (Beta[n] / ((Alpha[n]*Alpha[n]) + (Beta[n]*Beta[n]))); R[n1] = (x / (((2*(double)(n))1)  (x*R[n]))); } S[0] = sin(x); for (int n=1; n<MAX_TERMS; n++) { S[n] = R[n]*S[n1]; } for (int n=0; n<MAX_TERMS; n++) { XMDOUBLE2 t1 = Complex_Division(XMDOUBLE2(1.0f, 0), XMDOUBLE2(P[n], Q[n])); XMDOUBLE2 t2 = Complex_Division(XMDOUBLE2((double)(n), 0), z); A[n] = Complex_Subtract(t1, t2); B[n] = (((1/R[n])  ((double)(n)/x))); } C[0] = cos(x); C[1] = ((cos(x)/x) + sin(x)); for (int n=2; n<MAX_TERMS; n++) { C[n] = (((((2*(double)(n))1) / x) * C[n1])  C[n2]); } C_[0] = 0; for (int n=1; n<MAX_TERMS; n++) { C_[n] = (((((double)(n)) / x) * C[n])  C[n1]); } for (int n=0; n<MAX_TERMS; n++) { G[n] = XMDOUBLE2(1, (C[n]/S[n])); H[n] = XMDOUBLE2(B[n], (C_[n]/S[n])); } for (int n=0; n<MAX_TERMS; n++) { XMDOUBLE2 t1 = Complex_Multiply(m, XMDOUBLE2(B[n], 0)); XMDOUBLE2 t2 = Complex_Multiply(A[n], G[n]); XMDOUBLE2 t3 = Complex_Multiply(m, H[n]); a[n] = Complex_Division(Complex_Subtract(A[n], t1), Complex_Subtract(t2, t3)); XMDOUBLE2 t4 = Complex_Multiply(m, A[n]); XMDOUBLE2 t5 = Complex_Multiply(t4, G[n]); b[n] = Complex_Division(Complex_Subtract(t4, XMDOUBLE2(B[n], 0)), Complex_Subtract(t5, H[n])); } double Qext = 0, tmp = 0; for (int n=0; n<MAX_TERMS; n++) { tmp += (((2*(double)(n))+1) * Complex_Add(a[n], b[n]).x); } Qext = ((tmp*2) / (x*x)); char s[256]; sprintf_s(s, "%.25f", Qext); MessageBoxA(0, s, "", MB_OK); } }



Popular Now