Skip to content

Course ReviewΒ #159

@krzychukula

Description

@krzychukula

Exercise 4

There was no info about "&&" in the previous lessons.

I would start with information that you can use && like in JS (preferably with short code sample)

for example: a < b == lessThan(a, b)

In my opinion shuld be extended with something like:

for example: a < b == lessThan(a, b) == bvec(bool, bool)

to make sure it's obvious what is the type of the result.

Then in "boolean vectors" I would appreciate if it would be explained when and why should I use all/any functions.

Something like:
"Instead of writing p.x && p.y && p.z on bvec3 you can use handy function: all(p) that will do the same thing.

I may add feedback to other lessons here but feel free to close it earlier.

Exercise 5

float x = 0.0;
for(int i=0; i<100; ++i) {
  x += i;   //Executes 100 times
}

Actually I had to change it to i<=100 to make it work and I wasn't something I was expecting:

float x = 0.0;
for(int i=0; i<=100; ++i) {
  x += i;   //Executes 100 times
}

Exercise 6

It would be great to have a reminder somewhere that I can't use n in for(int i = 0; i < N; i++) and I have to use static number for(int i = 0; i < 16; i++)
#104 helped a lot :)

Exercise 7

Something about length or distance or just link to the documentation would help a lot.

Exercise 8

frag-2
There is no info which color to set if fragments is not discarded, but the only one that worked was:
gl_FragColor = vec4(1,1,1,1);

Exercise 10

I had no idea how to solve it.
I would say this one is really to hard, even looking at the result it's not clear what really happens here or why multiplication is the same as rotation... Really confusing.

  //this matrix is really magical for me, how am I supposed to know
  //that I have to create rotation matrix and even then
  //how am I supposed to figure out the order of cos and sin not to mention
  //the signs...
  mat2 rot = mat2(c, s, -s, c);

Exercise 13 geom-2

  1. The test passes without any changes - that's probably a bug :)
  2. Is there anywhere mentioned what different position in matrix do? I don't think so, yet user has to know magical positions in the matrix to do the translation.
  3. Translate function - I can't see how this code sample with vector is supposed to be helpful? It adds up to the confusion in my opinion.
  4. At the end I have noticed the link to wikipedia. This one was helpful, I just didn't notice it at first...

Exercise 14 geom-3

Link to https://en.wikipedia.org/wiki/Scaling_(geometry) would be helpful

Exercise 15 geom-4

No idea where where to get this:

n = normalize(n);
  return mat4(1.0-2.0*n.x*n.x,    -2.0*n.y*n.x,    -2.0*n.z*n.x, 0,
                 -2.0*n.y*n.x, 1.0-2.0*n.y*n.y,    -2.0*n.z*n.y, 0, 
                 -2.0*n.z*n.x,    -2.0*n.y*n.z, 1.0-2.0*n.z*n.z, 0,
                            0,               0,               0, 1);

If it's obvious easy to find then maybe there should be some required reding before?

Light 1

"That is, there is some parameter called kA which just determines the color of each fragment."
ambient parameter is supposed to determine color.

Light 2

  1. No idea what lamber weight code is for.
  2. Reflected light code - useful
  3. Parallel distance - no idea how to use
    All in all fragment shader was pretty easy but I had no idea how to create fragNormal and that I needed worldNormal not to menion how to create it.

Light 3

Just to hard for me :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions