• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By RenderPixel
      Hello. I have already posted a thread about myself and what I am trying to accomplish here.  TLDR: I am a 12 year, game industry, artist moving into graphics programming, starting with hlsl shader development. I started with a basic phong shader and received a ton of help on these forums here. Now I continue my journey and am starting a new thread with general questions. I am using several books and online resources in my process but sometimes community is a great way to learn as well. 
      Here we go!
      Question #1: 
      I understand that there are global variables and local variables. If you want to use a declared, global. variable in a function (like a vertex shader) you need to pass it in. I usually create a struct that I want to use in the vertex shader for this reason. However, I have noticed that some variables (like, worldViewProjection : WORLDVIEWPROJECTION) can be declared and used in a function without being passed into it. Why is that? What am I missing here?
      basically I want to learn more about Creating music for video games. I am not asking for payment but a chance to make some custom music for your project.
      I don't mind working on something short like a trailer or even up to a 1hour of gameplay. Rather than just making music without any project in mind I want to work on something custom.
      My instagram is @nickMakmusic
      I am open to any genres and want to find my style and such.
      I put my Soundcloud and Pond5 Links Below
    • By Hashbrown
      My light is positioned at vec3(0, 0, 2) which is in front of an object at vec3(0, 0, 0). If I don't rotate the object, everything seems to look fine:

      The problem occurs when I rotate the object, the object's lit area seems to rotate with the object. Instead of just shining the faces looking at the light.

      In fact here's another strange example but with specular added. The effect is correct in the first the rotation, the second it's dark, and in the third it's back to good again

      I can't seem to figure out what the problem is with my shader. I even tried calculating the normal matrix in glsl, just in case my implementation was wrong, but I get the same results:
      nrms = mat3(transpose(inverse(model))) * normals; // and nrms = normalMat * normals; // both get same results. I really don't think it has to do with the normals, the light calculations visually seem okay, as long as I don't rotate the object though.
      In fact, I can translate and rotate the camera and the lighting is still good, again, as long as I don't rotate the object. By the way, camera rotation is not considered in the calculations since I'm passing the camera.transform.position vec3 to calculate the toCam vector I use in my lighting calculations.
      There's clearly something I'm doing wrong. I'm guessing it has to do with what space am I calculating against. It's almost like I'm calculating based on the model's local space instead of world.
      Hopefully somebody can identify what it is though, I'll share the vertex and frag shaders below. I didn't include the specular portion though. thanks a lot!
      #version 300 es #ifdef GL_ES precision mediump float; #endif layout (location= 0) in vec3 vertex; layout (location= 1) in vec3 normals; layout (location= 2) in vec2 uv; layout (location= 3) in vec3 colors; out vec3 fragPos; out vec3 baseColors; out vec3 nrms; out vec3 camPosition; uniform vec3 camera; uniform mat3 normalMat; uniform mat4 model; uniform mat4 projection; uniform mat4 view; uniform mat4 mvp; void main() { // nrms = mat3(transpose(inverse(model))) * normals; baseColors = colors; nrms = normalMat * normals; fragPos = vec3(model * vec4(vertex, 1.0)); camPosition = camera; gl_Position = mvp * vec4(fragPos, 1.0); }  
      #version 300 es #ifdef GL_ES precision mediump float; #endif #define PI 3.14159265359 #define TWO_PI 6.28318530718 #define NUM_LIGHTS 2 in vec3 fragPos; in vec3 baseColors; in vec3 nrms; in vec3 camPosition; out vec4 color; struct Light { vec3 position; vec3 intensities; float attenuation; float ambient; }; Light light; void main () { light.position.x = 0.0; light.position.y = 0.0; light.position.z = 2.0; light.intensities.r = 1.0; light.intensities.g = 1.0; light.intensities.b = 1.0; light.ambient = 0.005; vec4 base = vec4(baseColors, 1.0); vec3 normals = normalize(nrms); vec3 toLight = normalize(light.position - fragPos); vec3 toCamera = normalize(camPosition - fragPos); // Ambient vec3 ambient = light.ambient * base.rgb * light.intensities; // Diffuse float diffuseBrightness = max(0.0, dot(normals, toLight)); vec3 diffuse = diffuseBrightness * base.rgb * light.intensities; // Composition vec3 linearColor = ambient + (diffuse); vec3 gamma = vec3(1.0 / 2.2); color = vec4( pow(linearColor, gamma), base.a); }  
    • By AndyCo
      I`m looking for some project to boost up my portfolio, I`m not a pro but I`m not bad at all.
      Feel free to contact me.
    • By MoreLion
      Project Name:The Legends Gate:Battle Of Sorrugar
      Studio: Inbound Entertainment.
      Engine: Unreal Engine 4
      Platforms: PC And Mac(Steam) & Xbox One/PS4 (Very Very Far Future)
      Team Size:3
      Compensation: Royalty/Payback After Funding
      Roles Required:Environment Artist/3D Animator/Level Designer And Unreal Engine Programmer And Any Others!
      Project Length: Hoping For Release In 2020/2022
      [3D ANIMATOR/ENVIRONMENT ARTIST] - Realistic Assets/Textures - GUI Creation - Environment Asset Creation - Create Animations
      [PROGRAMMER REQUIREMENTS] - Fluent Programming - Work With Other Programmers And 3D Artists - Must Be Able To Create Combat Systems And NPC AI Systems
      About Me: I’m A Game Designer With A Bit Of Experience, I’ve Been Working On This Project Game Design Wise For Nearly 4 years.
      The Project Has Changed So Much, especially Story And GamePlay Wise.
      Project Description: Hello! Me And A Concept Artist Are Looking To Start Up This Team, You Can See What We Are Looking For Above, The Game Is A First Person RPG And Is Also Open World, This Is An Ambitious Project That I’ve Been Working On For 4 Years Game Design Wise And Story Wise. I Will Tell You More About The Story When You Apply Below. Also We Welcome Any Other Skills You Want To Offer As The Game Is Currently In Pre Production And Building A Team Is Very Important.
      Apply:DM Me On Discord riobio55#1958 or email me at liondude12@gmail.com
  • Advertisement
  • Advertisement
Sign in to follow this  


Recommended Posts

BOOM is a multiplayer shooter that takes place on one of the satellites of Saturn. Destroy your enemies using your large arsenal! The game features excellent graphics and a spacious map. Good luck fighter!
W - Forward
S - Backward
A - Left
D - Right
SPACE - Jump
Enter - Chat
LBM - Shot
RBM - Sight
V - Third party





Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement