Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
Unexpected token struct in compute shader

I'm using a compute shader to speed up parallel processing of a 3D space computation. The shader gives me compile error Shader error in 'Polygonize': syntax error: unexpected token 'struct' at kernel Polygonize at Polygonize.compute(10) (on d3d11). Polygonize.compute is the shader file. The weirdest thing is that the first struct doesn't cause an error but the second one does. This is the code: (there's more later but the error occurs at the declaration of the second struct)

#pragma kernel Polygonize


struct Points {
  float value;
  int material;
  float3 location;
}

struct vertex {
  float3 location;
  bool weld;
  int weldnumber;
}
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Afaik in shaders (HLSL) the definition of structs ends with ;

so it should be

struct Points {
  float value;
  int material;
  float3 location;
};

struct vertex {
  float3 location;
  bool weld;
  int weldnumber;
};
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!