Jump to content

  • Log In with Google      Sign In   
  • Create Account


cifa

Member Since 29 Feb 2012
Offline Last Active Jul 19 2014 03:09 AM
-----

Posts I've Made

In Topic: BRDF gone wrong

22 April 2014 - 05:33 PM

The most common cause of NaN in a shader is division by 0. In your case you will get division by 0 whenever NdotL or NdotV is 0, since your denominator has those terms in in it. To make that work with your current setup, you would need to wrap your specular calculations in an if statement that checks if both N dot L and N dot V are greater than 0. However in many cases it's possible to write your code in such a way that there's no chance of division by 0. For instance, take your "implicit G" function. This is meant to cancel out the NdotL * NdotV in the denominator by putting the same terms in the numerator. So in that case, it would be better if you canceled it out in your code by removing the implicitG function and then also removing the N dot L and N dot V from the denominator. 

 

Also I should point out another common mistake that you're making, which is that you need to multiply your entire BRDF by NdotL. If you look up the definition of the BRDF, you'll find that it's the ratio of lighting scattered towards the eye (which is the value you're computing in your fragment shader) relative to the irradiance incident to the surface. When you're dealing point lights/spot lights/directional lights/etc. the irradiance is equal to LightIntensity * LightAttenuation * Shadowing * NdotL. In your case you don't have shadows and you don't seem to be using an attenuation factor (which is fine), you 'll want to multiply your specular by (uLightColor * NdotL). A lot of people tend to associate the NdotL with diffuse, but really it's not part of the diffuse BRDF. A lambertian diffuse BRDF is actually just a constant value, the NdotL is part of the irradiance calculations.

 

Oh thank you very much! I indeed re-wrote everything (that snippet is an extract) so to  avoid division as much as possible and it now works like a charm. As for the NdotL issue thank you for pointing out, I did know that on back of my head but I probably got confused by what was in a old piece of code of mine! 


In Topic: Experience after uni before landing into industry

12 April 2014 - 02:27 PM

Job hunting can be a slow and long process, so probably good to start as soon as your studies are done - or even while you're still studying if a good opportunity arises, e.g. If you see an ad for a junior / entry-level graphics programmer!

Your SSS work will be good portfolio material. Make sure to explore a few different trade-offs and/or different techniques. If you can, use code samples from that project in your portfolio.

Other gfx work that you could do to practice could be
- if you're interested in API design, make a wrapper around one or more other APIs, such as a d3d/GL portability layer, or a high level renderer on top of either d3d or GL.
- do more post processing work, such as DOF, bloom, HDR tonemapping, lens flares, color correction, etc.
- implement a few different lighting systems and the ability to switch between at runtime, e.g. Forward, deferred, light-pre-pass, inferred, forward+, clustered deferred, etc.
- implement a few different shadow systems, e.g. Cascades, omni lights, spotlights / filters like PCF, ESM, VSM, etc.
- implement some different material models (BRDFs) like Lambert, Phong, Blinn-Phong, Cook-Torrence, GGX, Ward, etc.

P.S. Don't worry about the impostor syndrome. Everyone will have low expectations of a new graduate, and will expect them to learn a lot on the job. As long as you're capable of continually learning, you'll be fine. Also, a lot of people working in the industry are of an average skill level, not everyone is a rock star coder ;)

P.p.s. Gfx programmers are really in demand right now, there's lots of advertised positions. Join some of the game jobs groups on LinkedIn so recruiters can find you. Describe yourself as a graphics programmer on there too ;)
I don't often see junior gfx programmer jobs listed, but because demand is so high, some companies may be willing to hire one anyway, because they can't find any senior/intermediate candidates.
I personally started in gameplay, then tools, then transferred internally to graphics, then effects, then engine... But you might get lucky and find a good gfx spot right away.

 

 

An enlightening reply! Thank you so much! I'll try some of the things you cited.

As far learning is concerned I'm always extremely eager to learn!

 

Again, I sincerely thank you a lot for this answer! 


In Topic: Experience after uni before landing into industry

10 April 2014 - 02:40 AM

I can not give you a final answer as it's always hard to tell from company to company, but I will share my experience with you when I was searching for an internship as graphics programmer. A real job might or might not be more difficult depending on a lot of factors that is once again different per company. This info also includes programmers I know that actually got a job.

 

I'm studying in the Netherlands, which has a game development course that is relatively well known in here and the (mostly) qualitative people that graduate from there, so that is also a factor that favors them. Generally, you will not get hired as graphics programmer immediately, they expect some experience first or you really need to put some convincing stuff in your portfolio that shows you know what you are doing, so be prepared to be flexible if you found a place where you really want to stick and work your way up.

 

A degree is something that is in your favor and if it is something relevant to what you want to do, that's always a good thing. A degree alone is not something that will get you there though, a portfolio with relevant work on it is a must in almost all cases. So the more relevant work you can show, the better your chances are. Especially as a programmer, they want to see some code as well. 

 

For my application to Guerrilla Games, I was given the feedback to post some source code and that they would've liked to see some more projects other than the college ones. Didn't get the internship, but the feedback was very valuable for future references of course.

 

In your case, I think both options will benefit you one way or another. Getting experience "in the field" is always a good thing, though some companies don't count internship as "real" working experience, but that might also be just when it is actually college related. You can also always work on something on the side alongside of an internship.

 

Hope it helps, and good luck! smile.png

 

Thank you very much! Do you have any idea of the scope of works on the portfolio they want? 

 

 

If you can get a job now, do that - and work on your portfolio in your spare time.
If you can't get a job now, keep trying - and work on your portfolio in your spare time.
An internship is a job, btw.

 

Oh ok! So basically keep trying sending application while building the portfolio! Thanks!  Do you have any suggestion about what can be a good project to work on my own to increase my chances of be considered as graphic programmer? 

 

(I know internship is a job, for job position I meant everything from intern to junior programmer, whilst with the first option I don't think I can do much more than internship) 


In Topic: Experience after uni before landing into industry

06 April 2014 - 09:39 AM


 

I don't know how it works in Europe, but in the US, once you finish university your college loans come due and you're pretty much out in the world on your own - that means you need money for things like food, rent, lights, internet etc... Generally you do internships while you're still attending the university - if you're graduating with a master's degree, you should be able to find an entry level position in the software industry (even if it isn't graphics programming - if it is, bonus!).  That experience counts and will help you get to the job you want.

 

Sometimes before you can get the job you want, you need to take the job you need.

 

Fortunately I had a  scholarship and the rest I was able to cover with my own finances without loans. Although I can't afford to stay still forever I definitely can for couple of months as I can go back home and work from there. In such situation I would definitely try to work hard to get the job I want, is this delusional? 

All the internship system is not usual in Italy, so I never had the chance sad.png


In Topic: Different results with animation made via shader or bufferSubData

04 June 2013 - 09:54 AM

Ok, so i don't see why.

 

Can you give us the solution plz? You said that you inversed formulas. Which ones? 

 

 

 

The animation formulas biggrin.png Just the coordinate modification was wrong in the function used by the subData version


PARTNERS